Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Main.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{-# LANGUAGE BlockArguments #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
Expand Down Expand Up @@ -74,7 +75,7 @@ loop w checked color slider r pos size' selected tab1Ref tab2Ref = do

setNextWindowBgAlpha 0.42

begin "My Window"
begin Begin{ name = "My Window", isOpen = Nothing }

text "Hello!"

Expand Down Expand Up @@ -112,7 +113,7 @@ loop w checked color slider r pos size' selected tab1Ref tab2Ref = do

sameLine >> arrowButton "Arrow" ImGuiDir_Up

sameLine >> checkbox "Check!" checked >>= \case
sameLine >> checkbox Checkbox{ label = "Check!", checked = toStateVar checked } >>= \case
True -> readIORef checked >>= print
False -> return ()

Expand Down
2 changes: 1 addition & 1 deletion examples/Readme.hs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ mainLoop w = do
newFrame

-- Build the GUI
bracket_ (begin "Hello, ImGui!") end do
bracket_ (begin Begin{ name = "Hello, ImGui!", isOpen = Nothing }) end do
-- Add a text widget
text "Hello, ImGui!"

Expand Down
2 changes: 1 addition & 1 deletion examples/glfw/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ mainLoop win = do
newFrame

-- Build the GUI
bracket_ (begin "Hello, ImGui!") end do
bracket_ (begin Begin{ name = "Hello, ImGui!", isOpen = Nothing }) end do
-- Add a text widget
text "Hello, ImGui!"

Expand Down
Loading