[Issue #4] Counter example #15
@@ -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 {}
|
||||
|
||||
Reference in New Issue
Block a user