Merge pull request #189 from agersant/hover-flags

Added ability to pass flags to is_item_hovered
This commit is contained in:
Joonas Javanainen 2018-12-16 21:23:55 +02:00 committed by GitHub
commit 14eaf77200
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1595,11 +1595,19 @@ impl<'ui> Ui<'ui> {
unsafe { sys::igIsItemHovered(ImGuiHoveredFlags::empty()) }
}
pub fn is_item_hovered_with_flags(&self, flags: ImGuiHoveredFlags) -> bool {
unsafe { sys::igIsItemHovered(flags) }
}
/// Return `true` if the current window is being hovered by the mouse.
pub fn is_window_hovered(&self) -> bool {
unsafe { sys::igIsWindowHovered(ImGuiHoveredFlags::empty()) }
}
pub fn is_window_hovered_with_flags(&self, flags: ImGuiHoveredFlags) -> bool {
unsafe { sys::igIsWindowHovered(flags) }
}
/// Return `true` if the current window is currently focused.
pub fn is_window_focused(&self) -> bool {
unsafe { sys::igIsWindowFocused(ImGuiFocusedFlags::RootAndChildWindows) }