From c00143ec9d932ac74dff2e9ae4d6d07928e4a857 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sat, 20 Jan 2024 20:04:05 -0600 Subject: general improvments better window open debugger works again new go mod Signed-off-by: Jeff Carr Signed-off-by: Jeff Carr --- settings.go | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'settings.go') diff --git a/settings.go b/settings.go index f7af7df..f3ab8ac 100644 --- a/settings.go +++ b/settings.go @@ -5,14 +5,26 @@ import ( "go.wit.com/log" ) +func LogWindow() *LogSettings { + if myLogGui != nil { + myLogGui.Toggle() + return myLogGui + } + myLogGui = NewWindow() + myLogGui.draw() + myLogGui.win.Toggle() + myLogGui.win.Toggle() + return myLogGui +} + // This initializes the main object // You can only have one of these -func New(p *gui.Node) *LogSettings { +func NewWindow() *LogSettings { if myLogGui != nil { return myLogGui } myLogGui = new(LogSettings) - myLogGui.parent = p + myLogGui.parent = gui.TreeRoot() myLogGui.groups = make(map[string]*flagGroup) myLogGui.ready = true myLogGui.hidden = true -- cgit v1.2.3