From 6f2b1d76b411cf2fff9d00707856a71b53f42c23 Mon Sep 17 00:00:00 2001 From: Malik Olivier Boussejra Date: Tue, 22 May 2018 00:13:08 +0900 Subject: [PATCH] Ui: Add safe wrapper "is_window_hovered" --- src/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 0c99b31..2160edd 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1324,6 +1324,11 @@ impl<'ui> Ui<'ui> { unsafe { sys::igIsItemHovered(ImGuiHoveredFlags::empty()) } } + /// Return `true` if the current window is being hovered by the mouse. + pub fn is_window_hovered(&self) -> bool { + unsafe { sys::igIsWindowHovered(ImGuiHoveredFlags::empty()) } + } + /// Returns `true` if the last item is being active. pub fn is_item_active(&self) -> bool { unsafe {