Add support to peek chars via imgui rs io
@@ -328,6 +328,11 @@ impl Io {
sys::ImGuiIO_ClearInputCharacters(self.raw_mut());
}
}
+ /// Peek character input buffer, return a copy of entire buffer
+ pub fn peek_input_characters(&self) -> String {
+ let c16_slice = self.input_queue_characters.as_slice();
+ String::from_utf16(c16_slice).unwrap()
+ }
pub fn update_delta_time(&mut self, delta: Duration) {
let delta_s = delta.as_secs() as f32 + delta.subsec_nanos() as f32 / 1_000_000_000.0;
if delta_s > 0.0 {
