diff options
Diffstat (limited to 'eventMouseClick.go')
| -rw-r--r-- | eventMouseClick.go | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/eventMouseClick.go b/eventMouseClick.go index c884ea5..27c6f80 100644 --- a/eventMouseClick.go +++ b/eventMouseClick.go @@ -120,6 +120,10 @@ func doMouseClick(w int, h int) { log.Info("got dropdwon click", w, h, tk.cuiName) tk.dropdownClicked(w, h) } + if tk.node.WidgetId == me.textbox.wId { + log.Info("got textbox click", w, h, tk.cuiName) + tk.textboxClosed() + } } return } @@ -127,6 +131,17 @@ func doMouseClick(w int, h int) { // priority widgets. send the click here first for _, tk := range findByXY(w, h) { switch tk.node.WidgetType { + case widget.Checkbox: + if tk.node.State.Checked { + log.Log(WARN, "checkbox is being set to false") + tk.node.State.Checked = false + tk.setCheckbox() + } else { + log.Log(WARN, "checkbox is being set to true") + tk.node.State.Checked = true + tk.setCheckbox() + } + me.myTree.SendUserEvent(tk.node) case widget.Button: me.myTree.SendFromUser(tk.node) return @@ -140,7 +155,8 @@ func doMouseClick(w int, h int) { tk.showTextbox() return default: - tk.dumpWidget("undef click()") + // TODO: enable the GUI debugger in gocui + // tk.dumpWidget("undef click()") // enable this to debug widget clicks } } |
