From 7b80950782bdae88e5b79228710d8fc4a7f3529b Mon Sep 17 00:00:00 2001 From: Malik Olivier Boussejra Date: Sat, 2 Jun 2018 14:31:22 +0900 Subject: [PATCH] [ImGui] Add helper function "is_mouse_released" --- src/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 9e57415..d5d6003 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -274,6 +274,12 @@ impl ImGui { sys::igIsMouseDoubleClicked(button as c_int) } } + /// Returns `true` if the `button` provided as argument was released + pub fn is_mouse_released(&self, button: ImMouseButton) -> bool { + unsafe { + sys::igIsMouseReleased(button as c_int) + } + } pub fn key_ctrl(&self) -> bool { let io = self.io(); io.key_ctrl