diff options
| author | Jeff Carr <[email protected]> | 2023-04-03 17:49:37 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2023-04-03 17:49:37 -0500 |
| commit | 8982b2a8cfb10ad2ac2e50c0fcbdad88556e495a (patch) | |
| tree | eac01f4fcfeec2da568fa597e831648a78104f72 /toolkit/gocui/click.go | |
| parent | efe4d11576c0dbb0b1e4189274f9908c3eb7e7c3 (diff) | |
gocui: simple grid working
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'toolkit/gocui/click.go')
| -rw-r--r-- | toolkit/gocui/click.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/toolkit/gocui/click.go b/toolkit/gocui/click.go index e32825a..ce61bb7 100644 --- a/toolkit/gocui/click.go +++ b/toolkit/gocui/click.go @@ -23,9 +23,9 @@ func (w *cuiWidget) doWidgetClick() { case toolkit.Tab: w.redoBox(true) w.toggleTree() - - // w.toggleTree() - // me.rootNode.redoColor(true) + case toolkit.Grid: + w.redoBox(true) + w.toggleTree() case toolkit.Box: // w.showWidgetPlacement(logNow, "drawTree()") if (w.horizontal) { @@ -125,8 +125,8 @@ func ctrlDown(g *gocui.Gui, v *gocui.View) error { // find buttons that are below where the mouse button click f = func(widget *cuiWidget) { // if ((widget.logicalSize.w0 < w) && (w < widget.logicalSize.w1)) { - if ((widget.realSize.w0 < w) && (w < widget.realSize.w1) && - (widget.realSize.h0 < h) && (h < widget.realSize.h1)) { + if ((widget.realSize.w0 <= w) && (w <= widget.realSize.w1) && + (widget.realSize.h0 <= h) && (h <= widget.realSize.h1)) { widgets = append(widgets, widget) found = widget } @@ -137,8 +137,8 @@ func ctrlDown(g *gocui.Gui, v *gocui.View) error { } f(me.rootNode) var t string - for i, widget := range widgets { - log(logNow, "ctrlDown() FOUND widget", i, widget.name) + for _, widget := range widgets { + log(logNow, "ctrlDown() FOUND widget", widget.id, widget.name) t += widget.cuiName + " " + widget.name + "\n" // widget.showWidgetPlacement(logNow, "drawTree()") } |
