diff --git a/src/DearImGui.hs b/src/DearImGui.hs index a002ace..650b872 100644 --- a/src/DearImGui.hs +++ b/src/DearImGui.hs @@ -187,6 +187,8 @@ module DearImGui -- * Item/Widgets Utilities , Raw.isItemHovered + , Raw.wantCaptureMouse + , Raw.wantCaptureKeyboard -- * Types , module DearImGui.Enums diff --git a/src/DearImGui/Raw.hs b/src/DearImGui/Raw.hs index 9badd48..18c5113 100644 --- a/src/DearImGui/Raw.hs +++ b/src/DearImGui/Raw.hs @@ -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 } |]