diff options
Diffstat (limited to 'eventMouseClick.go')
| -rw-r--r-- | eventMouseClick.go | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/eventMouseClick.go b/eventMouseClick.go index eda0a26..ce0b6a6 100644 --- a/eventMouseClick.go +++ b/eventMouseClick.go @@ -10,6 +10,15 @@ import ( "go.wit.com/widget" ) +func (tk *guiWidget) doButtonClick() { + if tk.node.IsEnabled() { + tk.dumpWidget("click()") // enable this to debug widget clicks + me.myTree.SendFromUser(tk.node) + } else { + tk.dumpWidget("disabled()") // enable this to debug widget clicks + } +} + // this whole things was impossible to make but it got me where I am now // the debugging is way way better now with it being visible in the Stdout window // so now it's possible to redo all this and make it better @@ -28,9 +37,7 @@ func (tk *guiWidget) doWidgetClick(w int, h int) { } me.myTree.SendUserEvent(tk.node) case widget.Button: - // if tk.node.Enabled() { - me.myTree.SendFromUser(tk.node) - // } + tk.doButtonClick() case widget.Combobox: tk.showDropdown() case widget.Dropdown: @@ -87,8 +94,7 @@ func doMouseClick(w int, h int) { me.myTree.SendUserEvent(tk.node) return case widget.Button: - tk.dumpWidget("click()") // enable this to debug widget clicks - me.myTree.SendFromUser(tk.node) + tk.doButtonClick() return case widget.Combobox: tk.showDropdown() |
