add support for focus event

This commit is contained in:
jestarray 2024-10-20 16:07:59 -07:00 committed by Jonathan Spira
parent 2abba18c08
commit a09b72049f

View File

@ -458,6 +458,12 @@ impl Io {
} }
} }
pub fn add_focus_event(&mut self, focused: bool) {
unsafe {
sys::ImGuiIO_AddFocusEvent(self.raw_mut(), focused);
}
}
pub fn add_key_analog_event(&mut self, key: Key, down: bool, value: f32) { pub fn add_key_analog_event(&mut self, key: Key, down: bool, value: f32) {
unsafe { unsafe {
sys::ImGuiIO_AddKeyAnalogEvent(self.raw_mut(), key as u32, down, value); sys::ImGuiIO_AddKeyAnalogEvent(self.raw_mut(), key as u32, down, value);