summaryrefslogtreecommitdiff
path: root/button.go
diff options
context:
space:
mode:
Diffstat (limited to 'button.go')
-rw-r--r--button.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/button.go b/button.go
index 03d1528..1ce7327 100644
--- a/button.go
+++ b/button.go
@@ -13,9 +13,13 @@ func (n *Node) NewButton(name string, custom func()) *Node {
// TODO: this is still confusing and probably wrong. This needs to communicate through a channel
newNode.toolkit.Custom = func() {
- log.Println("gui.AppendButton() Button Clicked. Running custom() from outside toolkit START")
+ if (Config.Options.Debug) {
+ log.Println("gui.AppendButton() Button Clicked. Running custom() from outside toolkit START")
+ }
custom()
- log.Println("gui.AppendButton() Button Clicked. Running custom() from outside toolkit END")
+ if (Config.Options.Debug) {
+ log.Println("gui.AppendButton() Button Clicked. Running custom() from outside toolkit END")
+ }
}
newNode.custom = custom