Skip to content

Commit

Permalink
[ImGui] Add helper function "is_mouse_double_clicked"
Browse files Browse the repository at this point in the history
  • Loading branch information
malikolivier committed Jun 2, 2018
1 parent d21a394 commit 83b2b30
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 @@ -303,6 +303,12 @@ impl ImGui {
sys::igIsMouseClicked(button as c_int, false)
}
}
/// Returns `true` if the `button` provided as argument is being double-clicked.
pub fn is_mouse_double_clicked(&self, button: ImMouseButton) -> bool {
unsafe {
sys::igIsMouseDoubleClicked(button as c_int)
}
}
pub fn key_ctrl(&self) -> bool {
let io = self.io();
io.key_ctrl
Expand Down

0 comments on commit 83b2b30

Please sign in to comment.