summaryrefslogtreecommitdiff
path: root/eventBindings.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-02-01 17:58:13 -0600
committerJeff Carr <[email protected]>2025-02-01 17:58:13 -0600
commit5a2097d08053cbfc0d4c05fb7fec72d43ea7e5eb (patch)
treebb9076533ce92900fe633abe117226f3a2b886d3 /eventBindings.go
parent9a3f9d0991df81a7259801905b7febc2bebe03e8 (diff)
trying stuff that isn't working
Diffstat (limited to 'eventBindings.go')
-rw-r--r--eventBindings.go25
1 files changed, 25 insertions, 0 deletions
diff --git a/eventBindings.go b/eventBindings.go
index 93663b6..5eda90b 100644
--- a/eventBindings.go
+++ b/eventBindings.go
@@ -61,9 +61,33 @@ func setSuperMouse(g *gocui.Gui, v *gocui.View) error {
return nil
}
+var wtf bool
+
// use this to test code ideas
func theNotsure(g *gocui.Gui, v *gocui.View) error {
log.Info("got keypress 2. now what?")
+ // closes anything under your mouse
+ w, h := g.MousePosition()
+ for _, tk := range findByXY(w, h) {
+ if tk.node.WidgetType == widget.Stdout {
+ tk.dumpWidget("theNotsure() DrawAt STDOUT")
+ tk.DrawAt(10, 10)
+ if wtf {
+ log.Log(GOCUI, "set visible false")
+ tk.deleteView()
+ // tk.SetVisible(false)
+ wtf = false
+ } else {
+ log.Log(GOCUI, "set visible true")
+ tk.drawView()
+ // tk.SetVisible(true)
+ wtf = true
+ }
+ continue
+ }
+ }
+
+ /* closes anything under your mouse
w, h := g.MousePosition()
for _, tk := range findByXY(w, h) {
if tk.node.WidgetType == widget.Stdout {
@@ -73,6 +97,7 @@ func theNotsure(g *gocui.Gui, v *gocui.View) error {
tk.dumpWidget("theNotsure() HIDDING")
tk.Hide()
}
+ */
return nil
}