diff --git a/src/lib.rs b/src/lib.rs index 9053d5d..9e57415 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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