added openPopupOnItemClick (#133)

This commit is contained in:
Stefan Dresselhaus
2022-02-25 18:28:53 +01:00
committed by GitHub
parent 67e169dc35
commit b837d583a5
2 changed files with 20 additions and 0 deletions

View File

@ -197,6 +197,7 @@ module DearImGui.Raw
, beginPopupModal
, endPopup
, openPopup
, openPopupOnItemClick
, closeCurrentPopup
-- * ID stack/scopes
@ -1252,6 +1253,13 @@ openPopup :: (MonadIO m) => CString -> m ()
openPopup popupIdPtr = liftIO do
[C.exp| void { OpenPopup($(char* popupIdPtr)) } |]
-- | Call to mark popup as open (don't call every frame!).
--
-- Wraps @ImGui::OpenPopupOnItemClick()@
openPopupOnItemClick :: (MonadIO m) => CString -> ImGuiPopupFlags-> m ()
openPopupOnItemClick popupIdPtr flags = liftIO do
[C.exp| void { OpenPopupOnItemClick($(char* popupIdPtr), $(ImGuiPopupFlags flags)) } |]
-- | Manually close the popup we have begin-ed into.
--