mirror of
https://github.com/Drezil/dear-imgui.hs.git
synced 2025-07-07 21:39:55 +02:00
Add invisibleButton (#91)
This commit is contained in:
committed by
GitHub
parent
efaaa5723a
commit
4bfc7e7099
@ -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()@.
|
||||
|
Reference in New Issue
Block a user