summaryrefslogtreecommitdiff
path: root/eventMouseClick.go
diff options
context:
space:
mode:
Diffstat (limited to 'eventMouseClick.go')
-rw-r--r--eventMouseClick.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/eventMouseClick.go b/eventMouseClick.go
index ed560a7..6cdffd4 100644
--- a/eventMouseClick.go
+++ b/eventMouseClick.go
@@ -9,7 +9,7 @@ import (
)
func (tk *guiWidget) doButtonClick() {
- if tk.node.IsEnabled() {
+ if tk.IsEnabled() {
tk.dumpWidget("click()") // enable this to debug widget clicks
me.myTree.SendFromUser(tk.node)
} else {
@@ -25,12 +25,12 @@ func doMouseClick(w int, h int) {
if me.dropdown.active || me.textbox.active {
// can't drag or do anything when dropdown or textbox are visible
for _, tk := range findByXY(w, h) {
- if tk.node.WidgetId == me.dropdown.wId {
+ if tk.WidgetId() == me.dropdown.wId {
log.Info("got dropdwon click", w, h, tk.cuiName)
tk.dropdownClicked(w, h)
return
}
- if tk.node.WidgetId == me.textbox.wId {
+ if tk.WidgetId() == me.textbox.wId {
log.Info("got textbox click", w, h, tk.cuiName)
textboxClosed()
return
@@ -58,7 +58,7 @@ func doMouseClick(w int, h int) {
// look in this window for widgets
// widgets have priority. send the click here first
for _, tk := range win.findByXYreal(w, h) {
- switch tk.node.WidgetType {
+ switch tk.WidgetType() {
case widget.Checkbox:
if tk.node.State.Checked {
log.Log(WARN, "checkbox is being set to false")
@@ -101,12 +101,12 @@ func doMouseDoubleClick(w int, h int) {
}
for _, tk := range findByXY(w, h) {
- if tk.node.WidgetType == widget.Window {
+ if tk.WidgetType() == widget.Window {
tk.makeWindowActive()
return
}
- if tk.node.WidgetType == widget.Stdout {
+ if tk.WidgetType() == widget.Stdout {
if me.stdout.outputOnTop {
me.stdout.outputOnTop = false
setThingsOnTop()