mirror of
https://github.com/Drezil/dear-imgui.hs.git
synced 2025-07-06 04:58:48 +02:00
Wrap ImGui::BeginCombo(), EndCombo(), Selectable()
This commit is contained in:
10
Main.hs
10
Main.hs
@ -60,6 +60,11 @@ loop w checked = do
|
||||
|
||||
progressBar 0.314 (Just "Pi")
|
||||
|
||||
beginCombo "Label" "Preview" >>= whenTrue do
|
||||
selectable "Testing 1"
|
||||
selectable "Testing 2"
|
||||
endCombo
|
||||
|
||||
end
|
||||
|
||||
render
|
||||
@ -74,3 +79,8 @@ loop w checked = do
|
||||
Just Event{ eventPayload } -> case eventPayload of
|
||||
QuitEvent -> return ()
|
||||
_ -> loop w checked
|
||||
|
||||
|
||||
whenTrue :: IO () -> Bool -> IO ()
|
||||
whenTrue io True = io
|
||||
whenTrue io False = return ()
|
||||
|
Reference in New Issue
Block a user