[Issue #4] Counter example #15

Merged
HugoNijhuis merged 3 commits from issue-4-counter-example into main 2026-01-09 16:28:31 +00:00
2 changed files with 5 additions and 0 deletions
Showing only changes of commit a580df7b72 - Show all commits

BIN
counter Executable file

Binary file not shown.

View File

@@ -25,6 +25,11 @@ func main() {
count.Set(count.Get() + 1)
}, ui.TextFromString("Increment")))
// Button that decrements the count on click
view.Child(ui.Button(func() {
count.Set(count.Get() - 1)
}, ui.TextFromString("Decrement")))
ui.NewApp(view)
select {}