summaryrefslogtreecommitdiff
path: root/button.go
diff options
context:
space:
mode:
Diffstat (limited to 'button.go')
-rw-r--r--button.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/button.go b/button.go
index e176a34..b083474 100644
--- a/button.go
+++ b/button.go
@@ -6,11 +6,14 @@ func (n *Node) NewButton(name string, custom func()) *Node {
newNode := n.New(name, toolkit.Button, custom)
var a toolkit.Action
+ a.Title = name
a.Type = toolkit.Add
- // a.Widget = &newNode.widget
- // a.Where = &n.widget
- // action(&a)
+ a.Callback = callback
newaction(&a, newNode, n)
return newNode
}
+
+func callback(i int) {
+ log(debugError, "button callback() i =", i)
+}