summaryrefslogtreecommitdiff
path: root/button.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2022-11-05 10:19:04 -0500
committerJeff Carr <[email protected]>2022-11-05 10:19:04 -0500
commit099efb6b24caf9eaad50d7386636a7ac23552bde (patch)
tree215685d7153e6d002c921d4f7ad2fa12d52fe323 /button.go
parenta72d0ab2d0ff58704cc28993ea428b8c6c8825d7 (diff)
v0.4.2 more code cleanups and improvementsv0.4.2
Add command line argv handling using go-arg make hello world dumb stupid simple again more swtiching to common code move debugging options to support go-args more debugging output cleanup more debugging cleanups fix null pointer crash
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