mirror of
https://github.com/Drezil/dear-imgui.hs.git
synced 2024-11-22 08:56:59 +00:00
Wrap ImGui::SameLine()
This commit is contained in:
parent
bfa31b53a2
commit
85c6f34054
6
Main.hs
6
Main.hs
@ -48,13 +48,13 @@ loop w checked = do
|
||||
True -> putStrLn "Oh hi Mark"
|
||||
False -> return ()
|
||||
|
||||
smallButton "Click me" >>= \case
|
||||
sameLine >> smallButton "Click me" >>= \case
|
||||
True -> putStrLn "Oh hi Mark"
|
||||
False -> return ()
|
||||
|
||||
arrowButton "Arrow" ImGuiDirUp
|
||||
sameLine >> arrowButton "Arrow" ImGuiDirUp
|
||||
|
||||
checkbox "Check!" checked >>= \case
|
||||
sameLine >> checkbox "Check!" checked >>= \case
|
||||
True -> readIORef checked >>= print
|
||||
False -> return ()
|
||||
|
||||
|
@ -48,6 +48,9 @@ module DearImGui
|
||||
, begin
|
||||
, end
|
||||
|
||||
-- * Cursor/Layout
|
||||
, sameLine
|
||||
|
||||
-- * Widgets
|
||||
-- ** Text
|
||||
, text
|
||||
@ -308,6 +311,14 @@ end = liftIO do
|
||||
[C.exp| void { ImGui::End(); } |]
|
||||
|
||||
|
||||
-- | Call between widgets or groups to layout them horizontally.
|
||||
--
|
||||
-- Wraps @ImGui::SameLine@.
|
||||
sameLine :: MonadIO m => m ()
|
||||
sameLine = liftIO do
|
||||
[C.exp| void { SameLine(); } |]
|
||||
|
||||
|
||||
-- | Formatted text.
|
||||
--
|
||||
-- Wraps @ImGui::Text()@.
|
||||
|
Loading…
Reference in New Issue
Block a user