summaryrefslogtreecommitdiff
path: root/eventMouseClick.go
diff options
context:
space:
mode:
Diffstat (limited to 'eventMouseClick.go')
-rw-r--r--eventMouseClick.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/eventMouseClick.go b/eventMouseClick.go
index 8d33800..1f33ee7 100644
--- a/eventMouseClick.go
+++ b/eventMouseClick.go
@@ -18,7 +18,7 @@ func (tk *guiWidget) doWidgetClick(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.hideWidgets()
me.currentWindow.isCurrent = false
}
@@ -27,17 +27,18 @@ func (tk *guiWidget) doWidgetClick(w int, h int) {
me.currentWindow.isCurrent = true
tk.active = false
+ // might make the green box the right size
+ tk.setFullSize()
+
// draw the current window
w := tk.gocuiSize.w0 + 4
h := tk.gocuiSize.h0 + 4
tk.DrawAt(w, h)
- tk.setColor(&colorActiveW)
+ tk.setColor(&colorActiveW) // sets the window to Green BG
tk.showWidgets()
tk.placeWidgets(w, h) // compute the sizes & places for each widget
- full := tk.getFullSize()
- tk.gocuiSize.w1 = full.w1
- tk.gocuiSize.h1 = full.h1
+ tk.setFullSize()
me.baseGui.SetView(tk.cuiName, tk.gocuiSize.w0, tk.gocuiSize.h0, tk.gocuiSize.w1, tk.gocuiSize.h1, 0)
case widget.Group:
if tk.active {