mirror of
https://github.com/eliasstepanik/imgui-rs.git
synced 2026-01-11 05:28:35 +00:00
add support for adding analog key events
(e.g. gamepad analog sticks)
This commit is contained in:
parent
0899b904c0
commit
16faf4fda5
@ -459,6 +459,12 @@ impl Io {
|
||||
sys::ImGuiIO_AddKeyEvent(self.raw_mut(), key as u32, down);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn add_key_analog_event(&mut self, key: Key, down: bool, value: f32) {
|
||||
unsafe {
|
||||
sys::ImGuiIO_AddKeyAnalogEvent(self.raw_mut(), key as u32, down, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Index<Key> for Io {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user