summaryrefslogtreecommitdiff
path: root/eventMouseClick.go
diff options
context:
space:
mode:
Diffstat (limited to 'eventMouseClick.go')
-rw-r--r--eventMouseClick.go31
1 files changed, 18 insertions, 13 deletions
diff --git a/eventMouseClick.go b/eventMouseClick.go
index aa8be6e..5990f27 100644
--- a/eventMouseClick.go
+++ b/eventMouseClick.go
@@ -9,25 +9,30 @@ import (
"go.wit.com/widget"
)
+func (tk *guiWidget) doWindowClick(w int, h int) {
+ // if there is a current window, hide it
+ if me.currentWindow != nil {
+ me.currentWindow.setColor(&colorWindow)
+ // me.currentWindow.hideWidgets()
+ me.currentWindow.isCurrent = false
+ }
+
+ // now set this window as the current window
+ me.currentWindow = tk
+ me.currentWindow.isCurrent = true
+ tk.active = false
+
+ tk.redrawWindow(w, h)
+ setThingsOnTop() // sets help, Stdout, etc on the top after windows have been redrawn
+}
+
// 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
func (tk *guiWidget) doWidgetClick(w int, h int) {
switch tk.node.WidgetType {
case widget.Window:
- // if there is a current window, hide it
- if me.currentWindow != nil {
- me.currentWindow.setColor(&colorWindow)
- // me.currentWindow.hideWidgets()
- me.currentWindow.isCurrent = false
- }
-
- // now set this window as the current window
- me.currentWindow = tk
- me.currentWindow.isCurrent = true
- tk.active = false
-
- tk.redrawWindow(w-2, h-2) // TODO: fix these hard coded things with offsets
+ tk.doWindowClick(w, h)
return
case widget.Group:
/*