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

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

func (n *Node) NewLabel(text string) *Node {
	newNode := n.New(text, toolkit.Label, nil)

	var a toolkit.Action
	a.ActionType = toolkit.Add
	a.Name = text
	a.Text = text
	newaction(&a, newNode, n)

	return newNode
}