From c4d54a6e3660d948bae561b0acdfb048c3b321f2 Mon Sep 17 00:00:00 2001 From: Ollie Charles Date: Sun, 24 Jan 2021 17:00:25 +0000 Subject: [PATCH] Wrap ImGui::Separator() --- Main.hs | 2 ++ src/DearImGui.hs | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/Main.hs b/Main.hs index 11a2b28..bf443b6 100644 --- a/Main.hs +++ b/Main.hs @@ -58,6 +58,8 @@ loop w checked = do True -> readIORef checked >>= print False -> return () + separator + progressBar 0.314 (Just "Pi") beginCombo "Label" "Preview" >>= whenTrue do diff --git a/src/DearImGui.hs b/src/DearImGui.hs index a24164a..d9805ae 100644 --- a/src/DearImGui.hs +++ b/src/DearImGui.hs @@ -49,6 +49,7 @@ module DearImGui , end -- * Cursor/Layout + , separator , sameLine -- * Widgets @@ -311,6 +312,15 @@ end = liftIO do [C.exp| void { ImGui::End(); } |] +-- | Separator, generally horizontal. inside a menu bar or in horizontal layout +-- mode, this becomes a vertical separator. +-- +-- Wraps @ImGui::Separator()@ +separator :: MonadIO m => m () +separator = liftIO do + [C.exp| void { Separator(); } |] + + -- | Call between widgets or groups to layout them horizontally. -- -- Wraps @ImGui::SameLine@.