diff options
| author | Jeff Carr <[email protected]> | 2025-02-06 02:15:21 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-02-06 02:15:21 -0600 |
| commit | 3faacd6c43e451847af8143a0c58bfd95535478d (patch) | |
| tree | e1b8b5da33f39e48bad51b8739f10cec80c1032b /help.go | |
| parent | 31c130045d903b3c874dbf8728589a6a909704ae (diff) | |
nicer help menu & stdout behavior
Diffstat (limited to 'help.go')
| -rw-r--r-- | help.go | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -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") + } } |
