From 3faacd6c43e451847af8143a0c58bfd95535478d Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 6 Feb 2025 02:15:21 -0600 Subject: nicer help menu & stdout behavior --- help.go | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'help.go') diff --git a/help.go b/help.go index 9c1755c..31f53d9 100644 --- a/help.go +++ b/help.go @@ -25,7 +25,8 @@ import ( var helpText []string = []string{"KEYBINDINGS", "", - "?: toggle help", + "H: toggle (H)elp", + "O: toggle (O)output (os.STDOUT)", "S: super mouse", "M: list all widgets positions", "L: list all widgets in tree form", @@ -34,7 +35,6 @@ var helpText []string = []string{"KEYBINDINGS", "q: quit()", "p: panic()", - "o: show Stdout", "l: log to /tmp/witgui.log", "Ctrl-D: Toggle Debugging", "Ctrl-V: Toggle Verbose Debugging", @@ -93,10 +93,18 @@ func showHelp() error { return nil } -func helpTop() { +// in the very end of redrawing things, this will place the help and stdout on the top or botton +// depending on the state the user has chosen +func setThingsOnTop() { if me.showHelp { // terrible variable name. FIXME // log.Info("help is hidden") return } me.baseGui.SetViewOnTop("help") + + if me.outputOnTop { + me.baseGui.SetViewOnTop("msg") + } else { + me.baseGui.SetViewOnBottom("msg") + } } -- cgit v1.2.3