[ImGui] Add helper function "is_mouse_double_clicked"

This commit is contained in:
Malik Olivier Boussejra 2018-06-02 00:58:31 +09:00
parent 37d556ce3b
commit b62cd2eca8

View File

@ -268,6 +268,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