Skip to content

Commit

Permalink
[ImGui] Add helper function "is_mouse_released"
Browse files Browse the repository at this point in the history
  • Loading branch information
malikolivier committed Jun 2, 2018
1 parent 83b2b30 commit 28fe08c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,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
Expand Down

0 comments on commit 28fe08c

Please sign in to comment.