summaryrefslogtreecommitdiff
path: root/area.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2019-06-01 01:20:20 -0700
committerJeff Carr <[email protected]>2019-06-01 01:20:20 -0700
commitbf9b5bd49d65dae7868d74d5f972510c2585ff7a (patch)
tree6cbaf7e0b44a6054f91aa4307bb2ea41c75bdcb3 /area.go
parent133ed30192bce5e2b10a993aaa17d26a11bed93f (diff)
more control panel code removal
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'area.go')
-rw-r--r--area.go29
1 files changed, 27 insertions, 2 deletions
diff --git a/area.go b/area.go
index 1a0b9c9..3582900 100644
--- a/area.go
+++ b/area.go
@@ -101,7 +101,32 @@ func (ah GuiArea) KeyEvent(a *ui.Area, ke *ui.AreaKeyEvent) (handled bool) {
log.Println("GOT ENTER")
}
spew.Dump(ke)
- // splashWin.Destroy()
- // ui.Quit()
return false
}
+
+func ShowTextBox(gw *GuiWindow, newText *ui.AttributedString) *GuiBox {
+ log.Println("ShowTextBox() START")
+ if (gw == nil) {
+ log.Println("ShowTextBox() ERROR gw = nil")
+ return nil
+ }
+ log.Println("ShowTextBox() START gw =", gw)
+
+ // create and setup a new GuiBox
+ var gb *GuiBox
+ gb = new(GuiBox)
+
+ gb.EntryMap = make(map[string]*GuiEntry)
+ gb.EntryMap["test"] = nil
+
+ newbox := ui.NewVerticalBox()
+ newbox.SetPadded(true)
+ gb.UiBox = newbox
+ gb.W = gw
+ gw.BoxMap["Splash"] = gb
+
+ makeSplashArea(gb, newText)
+ newbox.Append(gb.Area.UiArea, true)
+
+ return gb
+}