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
|
||||
, Raw.isItemHovered
|
||||
, Raw.wantCaptureMouse
|
||||
, Raw.wantCaptureKeyboard
|
||||
|
||||
-- * Types
|
||||
, module DearImGui.Enums
|
||||
|
@ -156,6 +156,8 @@ module DearImGui.Raw
|
||||
|
||||
-- * Item/Widgets Utilities
|
||||
, isItemHovered
|
||||
, wantCaptureMouse
|
||||
, wantCaptureKeyboard
|
||||
|
||||
-- * Types
|
||||
, module DearImGui.Enums
|
||||
@ -873,3 +875,11 @@ pushStyleVar style valPtr = liftIO do
|
||||
popStyleVar :: (MonadIO m) => CInt -> m ()
|
||||
popStyleVar n = liftIO do
|
||||
[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