Add invisibleButton (#91)

This commit is contained in:
Alexander Bondarenko
2021-09-11 14:01:03 +03:00
committed by GitHub
parent efaaa5723a
commit 4bfc7e7099
2 changed files with 33 additions and 0 deletions

View File

@ -120,6 +120,7 @@ module DearImGui
-- ** Main
, button
, smallButton
, invisibleButton
, arrowButton
, checkbox
, progressBar
@ -416,6 +417,19 @@ smallButton label = liftIO do
withCString label Raw.smallButton
-- | Flexible button behavior without the visuals.
--
-- Frequently useful to build custom behaviors using the public api
-- (along with IsItemActive, IsItemHovered, etc).
--
-- Wraps @ImGui::InvisibleButton()@.
invisibleButton :: MonadIO m => String -> ImVec2 -> ImGuiButtonFlags -> m Bool
invisibleButton label size flags = liftIO do
withCString label \labelPtr ->
with size \sizePtr ->
Raw.invisibleButton labelPtr sizePtr flags
-- | Square button with an arrow shape.
--
-- Wraps @ImGui::ArrowButton()@.