mirror of
https://github.com/Drezil/dear-imgui.hs.git
synced 2024-11-26 10:37:00 +00:00
Wrap ImGui::IsItemHovered()
This commit is contained in:
parent
93b729dae3
commit
4ca9a3d38f
@ -87,6 +87,9 @@ module DearImGui
|
|||||||
, openPopup
|
, openPopup
|
||||||
, closeCurrentPopup
|
, closeCurrentPopup
|
||||||
|
|
||||||
|
-- * Item/Widgets Utilities
|
||||||
|
, isItemHovered
|
||||||
|
|
||||||
-- * Types
|
-- * Types
|
||||||
, ImGuiDir
|
, ImGuiDir
|
||||||
, pattern ImGuiDirLeft
|
, pattern ImGuiDirLeft
|
||||||
@ -533,6 +536,14 @@ closeCurrentPopup = liftIO do
|
|||||||
[C.exp| void { CloseCurrentPopup() } |]
|
[C.exp| void { CloseCurrentPopup() } |]
|
||||||
|
|
||||||
|
|
||||||
|
-- | Is the last item hovered? (and usable, aka not blocked by a popup, etc.).
|
||||||
|
--
|
||||||
|
-- Wraps @ImGui::IsItemHovered()@
|
||||||
|
isItemHovered :: MonadIO m => m Bool
|
||||||
|
isItemHovered = liftIO do
|
||||||
|
(1 ==) <$> [C.exp| bool { IsItemHovered() } |]
|
||||||
|
|
||||||
|
|
||||||
-- | A cardinal direction.
|
-- | A cardinal direction.
|
||||||
newtype ImGuiDir = ImGuiDir CInt
|
newtype ImGuiDir = ImGuiDir CInt
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user