mirror of
https://github.com/eliasstepanik/imgui-rs.git
synced 2026-01-13 22:48:34 +00:00
imgui: Add mouse_delta
This commit is contained in:
parent
e90a92c582
commit
abbbfdfa79
@ -190,6 +190,11 @@ impl ImGui {
|
||||
io.mouse_pos.x = x;
|
||||
io.mouse_pos.y = y;
|
||||
}
|
||||
/// Get mouse's position's delta between the current and the last frame.
|
||||
pub fn mouse_delta(&self) -> (f32, f32) {
|
||||
let io = self.io();
|
||||
(io.mouse_delta.x, io.mouse_delta.y)
|
||||
}
|
||||
pub fn set_mouse_down(&mut self, states: &[bool; 5]) {
|
||||
let io = self.io_mut();
|
||||
io.mouse_down = *states;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user