We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 93b729d commit 4ca9a3dCopy full SHA for 4ca9a3d
src/DearImGui.hs
@@ -87,6 +87,9 @@ module DearImGui
87
, openPopup
88
, closeCurrentPopup
89
90
+ -- * Item/Widgets Utilities
91
+ , isItemHovered
92
+
93
-- * Types
94
, ImGuiDir
95
, pattern ImGuiDirLeft
@@ -533,6 +536,14 @@ closeCurrentPopup = liftIO do
533
536
[C.exp| void { CloseCurrentPopup() } |]
534
537
535
538
539
+-- | Is the last item hovered? (and usable, aka not blocked by a popup, etc.).
540
+--
541
+-- Wraps @ImGui::IsItemHovered()@
542
+isItemHovered :: MonadIO m => m Bool
543
+isItemHovered = liftIO do
544
+ (1 ==) <$> [C.exp| bool { IsItemHovered() } |]
545
546
547
-- | A cardinal direction.
548
newtype ImGuiDir = ImGuiDir CInt
549
0 commit comments