summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-02-04 11:12:13 -0600
committerJeff Carr <[email protected]>2025-02-04 11:12:13 -0600
commit012273d8d3377003c12a40fdae6bc9b59c0ed649 (patch)
tree995e3a5cfe797ae754f9aaec43096ed9629dcb55
parent9d5cd2c865c298fd3c8c9fb9b5de83079d1fbc7c (diff)
misc
-rw-r--r--eventMouseMove.go22
1 files changed, 11 insertions, 11 deletions
diff --git a/eventMouseMove.go b/eventMouseMove.go
index a1c9a89..4402219 100644
--- a/eventMouseMove.go
+++ b/eventMouseMove.go
@@ -39,7 +39,7 @@ func mouseMove(g *gocui.Gui) {
// don't move this code out of here
var found bool = false
if currentDrag != nil {
- currentDrag.moveNew(g)
+ currentDrag.moveNew()
return
}
for _, tk := range findByXY(w, h) {
@@ -51,19 +51,19 @@ func mouseMove(g *gocui.Gui) {
for _, tk := range findByXY(w, h) {
if tk.node.WidgetType == widget.Flag {
currentDrag = tk
- // tk.moveNew(g)
+ // tk.moveNew()
return
}
}
for _, tk := range findByXY(w, h) {
if tk.node.WidgetType == widget.Stdout {
currentDrag = tk
- // tk.moveNew(g)
+ // tk.moveNew()
return
}
if tk.node.WidgetType == widget.Label {
currentDrag = tk
- // tk.moveNew(g)
+ // tk.moveNew()
return
}
found = true
@@ -89,8 +89,8 @@ func mouseMove(g *gocui.Gui) {
}
// this is how the window gets dragged around
-func (tk *guiWidget) moveNew(g *gocui.Gui) {
- w, h := g.MousePosition()
+func (tk *guiWidget) moveNew() {
+ w, h := me.baseGui.MousePosition()
if tk.node.WidgetType == widget.Window {
/*
w1, h1 := tk.Size()
@@ -108,7 +108,7 @@ func (tk *guiWidget) moveNew(g *gocui.Gui) {
if tk.node.WidgetType == widget.Flag {
// outputW, outputH := tk.Size()
// g.SetView(tk.cuiName, w-xOffset, h-yOffset, w-xOffset+outputW+20, h-yOffset+outputH+me.FramePadH+20, 0)
- g.SetView(tk.cuiName, w-3, h-3, w+20, h+20, 0)
+ me.baseGui.SetView(tk.cuiName, w-3, h-3, w+20, h+20, 0)
tk.verifyRect()
s := fmt.Sprintf("move(%dx%d) %s ###", w, h, tk.cuiName)
tk.dumpWidget(s)
@@ -117,15 +117,15 @@ func (tk *guiWidget) moveNew(g *gocui.Gui) {
// g.SetViewOnBottom(tk.cuiName)
return
} else {
- log.Info("NOT MOVE FLAG. PASSING MOVE TO MSG", tk.node.WidgetType)
+ // log.Info("NOT MOVE FLAG. PASSING MOVE TO MSG", tk.node.WidgetType)
}
- tk.dumpWidget("moveNew() on " + tk.cuiName)
+ // tk.dumpWidget("moveNew() MSG" + tk.cuiName)
outputW := 180
outputH := 40
- g.SetView("msg", w-xOffset, h-yOffset, w-xOffset+outputW, h-yOffset+outputH+me.FramePadH, 0)
+ me.baseGui.SetView("msg", w-xOffset, h-yOffset, w-xOffset+outputW, h-yOffset+outputH+me.FramePadH, 0)
me.startOutputW = w - xOffset
me.startOutputH = h - yOffset
- g.SetViewOnBottom("msg")
+ me.baseGui.SetViewOnBottom("msg")
}
func createStdout(g *gocui.Gui) bool {