summaryrefslogtreecommitdiff
path: root/button.go
diff options
context:
space:
mode:
Diffstat (limited to 'button.go')
-rw-r--r--button.go12
1 files changed, 5 insertions, 7 deletions
diff --git a/button.go b/button.go
index c14988f..dd93721 100644
--- a/button.go
+++ b/button.go
@@ -1,23 +1,21 @@
package gui
-import "log"
-
func (n *Node) NewButton(name string, custom func()) *Node {
- newNode := n.New(name)
+ newNode := n.New(name, "Button")
newNode.Widget.Custom = func() {
- log.Println("even newer clicker() name", newNode.Widget)
+ log(debugGui, "even newer clicker() name", newNode.Widget)
if (custom != nil) {
custom()
} else {
- log.Println("wit/gui No callback function is defined for button name =", name)
+ log(debugGui, "wit/gui No callback function is defined for button name =", name)
}
}
for _, aplug := range allPlugins {
- log.Println("gui.NewButton() aplug =", aplug.name, "name =", newNode.Widget.Name)
+ log(debugGui, "gui.NewButton() aplug =", aplug.name, "name =", newNode.Widget.Name)
if (aplug.NewButton == nil) {
- log.Println("\tgui.NewButton() aplug.NewButton = nil", aplug.name)
+ log(debugGui, "\tgui.NewButton() aplug.NewButton = nil", aplug.name)
continue
}
aplug.NewButton(&n.Widget, &newNode.Widget)