File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -48,13 +48,13 @@ loop w checked = do
48
48
True -> putStrLn " Oh hi Mark"
49
49
False -> return ()
50
50
51
- smallButton " Click me" >>= \ case
51
+ sameLine >> smallButton " Click me" >>= \ case
52
52
True -> putStrLn " Oh hi Mark"
53
53
False -> return ()
54
54
55
- arrowButton " Arrow" ImGuiDirUp
55
+ sameLine >> arrowButton " Arrow" ImGuiDirUp
56
56
57
- checkbox " Check!" checked >>= \ case
57
+ sameLine >> checkbox " Check!" checked >>= \ case
58
58
True -> readIORef checked >>= print
59
59
False -> return ()
60
60
Original file line number Diff line number Diff line change @@ -48,6 +48,9 @@ module DearImGui
48
48
, begin
49
49
, end
50
50
51
+ -- * Cursor/Layout
52
+ , sameLine
53
+
51
54
-- * Widgets
52
55
-- ** Text
53
56
, text
@@ -308,6 +311,14 @@ end = liftIO do
308
311
[C. exp | void { ImGui::End(); } |]
309
312
310
313
314
+ -- | Call between widgets or groups to layout them horizontally.
315
+ --
316
+ -- Wraps @ImGui::SameLine@.
317
+ sameLine :: MonadIO m => m ()
318
+ sameLine = liftIO do
319
+ [C. exp | void { SameLine(); } |]
320
+
321
+
311
322
-- | Formatted text.
312
323
--
313
324
-- Wraps @ImGui::Text()@.
You can’t perform that action at this time.
0 commit comments