From c2fd3561cb0a6ec49545b309ab8312aef7c3e598 Mon Sep 17 00:00:00 2001 From: Malik Olivier Boussejra Date: Tue, 29 May 2018 13:36:18 +0900 Subject: [PATCH] [ImGui] Add helper function to get wheel delta --- src/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 0c99b31..431a140 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -219,6 +219,11 @@ impl ImGui { let io = self.io_mut(); io.mouse_wheel = value; } + /// Get mouse wheel delta + pub fn mouse_wheel(&self) -> f32 { + let io = self.io(); + io.mouse_wheel + } /// Set to `true` to have ImGui draw the cursor in software. /// If `false`, the OS cursor is used (default to `false`). pub fn set_mouse_draw_cursor(&mut self, value: bool) {