diff options
Diffstat (limited to 'basicWindow.go')
| -rw-r--r-- | basicWindow.go | 30 |
1 files changed, 11 insertions, 19 deletions
diff --git a/basicWindow.go b/basicWindow.go index ae99d2a..b7c63c6 100644 --- a/basicWindow.go +++ b/basicWindow.go @@ -89,15 +89,15 @@ func (w *BasicWindow) StandardClose() { } w.win.Custom = w.win.StandardClose /* - log.Warn("BasicWindow.Custom() closed. TODO: handle this", w.title) - log.Warn("BasicWindow.Custom() closed. handled properly?", w.title) - if w.Custom != nil { - log.Warn("BasicWindow.Custom() HAS CUSTOM") - w.Custom() - return + log.Warn("BasicWindow.Custom() closed. TODO: handle this", w.title) + log.Warn("BasicWindow.Custom() closed. handled properly?", w.title) + if w.Custom != nil { + log.Warn("BasicWindow.Custom() HAS CUSTOM") + w.Custom() + return + } + w.win.StandardExit() } - w.win.StandardExit() - } */ return } @@ -143,9 +143,6 @@ func (w *BasicWindow) Ready() bool { } func (w *BasicWindow) Box() *gui.Node { - if !w.Initialized() { - return nil - } if w.win == nil { w.Draw() } @@ -171,9 +168,6 @@ func (w *BasicWindow) Horizontal() { } func (w *BasicWindow) Make() { - if !w.Initialized() { - return - } if w.win != nil { log.Warn("BasicWindow.Make() window was already created") return @@ -200,6 +194,7 @@ func (w *BasicWindow) Make() { w.box = w.win.NewHorizontalBox("BW HBOX") log.Log(INFO, "BasicWindow.Make() made NewHorizontalBox", w.title) } + w.win.SetVisable(false) w.ready = true } @@ -217,11 +212,8 @@ func (w *BasicWindow) TestDraw() { } func (w *BasicWindow) Draw() { - if !w.Initialized() { - return - } - if w.win != nil { - log.Warn("BasicWindow.Draw() window was already created") + if w.win == nil { + log.Warn("BasicWindow.Draw() needs Make()") w.Make() } w.win.TestDraw() |
