[ImGui] Add helper function "is_mouse_released"

This commit is contained in:
Malik Olivier Boussejra 2018-06-02 14:31:22 +09:00
parent b62cd2eca8
commit 7b80950782

View File

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