mirror of
https://github.com/eliasstepanik/imgui-rs.git
synced 2026-01-14 23:18:28 +00:00
Merge pull request #189 from agersant/hover-flags
Added ability to pass flags to is_item_hovered
This commit is contained in:
commit
14eaf77200
@ -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) }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user