Skip to content

Commit 28fe08c

Browse files
committed
[ImGui] Add helper function "is_mouse_released"
1 parent 83b2b30 commit 28fe08c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/lib.rs

+6
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,12 @@ impl ImGui {
309309
sys::igIsMouseDoubleClicked(button as c_int)
310310
}
311311
}
312+
/// Returns `true` if the `button` provided as argument was released
313+
pub fn is_mouse_released(&self, button: ImMouseButton) -> bool {
314+
unsafe {
315+
sys::igIsMouseReleased(button as c_int)
316+
}
317+
}
312318
pub fn key_ctrl(&self) -> bool {
313319
let io = self.io();
314320
io.key_ctrl

0 commit comments

Comments
 (0)