basic window opens correctly on first try

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-02-11 04:17:06 -06:00
parent 6a1b386ca5
commit 0a70e64ff0
1 changed files with 5 additions and 2 deletions

View File

@ -37,12 +37,17 @@ func NewBasicWindow(parent *gui.Node, title string) *BasicWindow {
w = &BasicWindow{
title: title,
vertical: false,
hidden: true,
}
log.Log(GADGETS, "NewBasicWindow() END")
return w
}
func (w *BasicWindow) Hidden() bool {
return w.hidden
}
func (w *BasicWindow) Show() {
if !w.Ready() {
return
@ -76,10 +81,8 @@ func (w *BasicWindow) Toggle() {
}
if w.hidden {
w.Show()
w.hidden = false
} else {
w.Hide()
w.hidden = true
}
return
}