Wrap ImGui::BeginCombo(), EndCombo(), Selectable()

This commit is contained in:
Ollie Charles
2021-01-24 16:14:51 +00:00
parent 5a1f5c78ec
commit aa681fb77d
2 changed files with 43 additions and 0 deletions

10
Main.hs
View File

@ -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 ()