summaryrefslogtreecommitdiff
path: root/button.go
blob: e176a342b7972c955395c2907ad737fa3cf0071e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package gui

import "git.wit.org/wit/gui/toolkit"

func (n *Node) NewButton(name string, custom func()) *Node {
	newNode := n.New(name, toolkit.Button, custom)

	var a toolkit.Action
	a.Type = toolkit.Add
	// a.Widget = &newNode.widget
	// a.Where = &n.widget
	// action(&a)
	newaction(&a, newNode, n)

	return newNode
}