mirror of
https://github.com/Drezil/dear-imgui.hs.git
synced 2024-11-22 16:57:00 +00:00
Add wantCaptureMouse, wantCaptureKeyboard (#54)
This commit is contained in:
parent
8723ac2625
commit
5cdce50c3a
@ -187,6 +187,8 @@ module DearImGui
|
|||||||
|
|
||||||
-- * Item/Widgets Utilities
|
-- * Item/Widgets Utilities
|
||||||
, Raw.isItemHovered
|
, Raw.isItemHovered
|
||||||
|
, Raw.wantCaptureMouse
|
||||||
|
, Raw.wantCaptureKeyboard
|
||||||
|
|
||||||
-- * Types
|
-- * Types
|
||||||
, module DearImGui.Enums
|
, module DearImGui.Enums
|
||||||
|
@ -156,6 +156,8 @@ module DearImGui.Raw
|
|||||||
|
|
||||||
-- * Item/Widgets Utilities
|
-- * Item/Widgets Utilities
|
||||||
, isItemHovered
|
, isItemHovered
|
||||||
|
, wantCaptureMouse
|
||||||
|
, wantCaptureKeyboard
|
||||||
|
|
||||||
-- * Types
|
-- * Types
|
||||||
, module DearImGui.Enums
|
, module DearImGui.Enums
|
||||||
@ -873,3 +875,11 @@ pushStyleVar style valPtr = liftIO do
|
|||||||
popStyleVar :: (MonadIO m) => CInt -> m ()
|
popStyleVar :: (MonadIO m) => CInt -> m ()
|
||||||
popStyleVar n = liftIO do
|
popStyleVar n = liftIO do
|
||||||
[C.exp| void { PopStyleVar($(int n)) } |]
|
[C.exp| void { PopStyleVar($(int n)) } |]
|
||||||
|
|
||||||
|
wantCaptureMouse :: MonadIO m => m Bool
|
||||||
|
wantCaptureMouse = liftIO do
|
||||||
|
(0 /=) <$> [C.exp| bool { GetIO().WantCaptureMouse } |]
|
||||||
|
|
||||||
|
wantCaptureKeyboard :: MonadIO m => m Bool
|
||||||
|
wantCaptureKeyboard = liftIO do
|
||||||
|
(0 /=) <$> [C.exp| bool { GetIO().WantCaptureKeyboard } |]
|
||||||
|
Loading…
Reference in New Issue
Block a user