From 9c7b139e5ac7c0fbec70a827aab6d0d2b9a030b7 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 6 Feb 2025 04:47:50 -0600 Subject: full screen BG widget is created. good enough to ship it --- help.go | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'help.go') diff --git a/help.go b/help.go index ac69f37..a0ac91c 100644 --- a/help.go +++ b/help.go @@ -89,14 +89,27 @@ func showHelp() error { // depending on the state the user has chosen func setThingsOnTop() { if me.showHelp { // terrible variable name. FIXME - // log.Info("help is hidden") - return + // log.Info("help does not exist") + } else { + me.baseGui.SetViewOnTop("help") } - me.baseGui.SetViewOnTop("help") if me.stdout.outputOnTop { me.baseGui.SetViewOnTop("msg") } else { me.baseGui.SetViewOnBottom("msg") } + setBottomBG() +} + +func setBottomBG() { + // this attempts to find the "BG" widget and set it to the background on the very very bottom + rootTK := me.treeRoot.TK.(*guiWidget) + if tk := rootTK.findBG(); tk != nil { + // log.Info("found BG. setting to bottom", tk.cuiName) + tk.v.Clear() + me.baseGui.SetViewOnBottom(tk.cuiName) + w, h := me.baseGui.Size() + me.baseGui.SetView(tk.cuiName, -1, -1, w+1, h+1, 0) + } } -- cgit v1.2.3