From 5e505b4f7ba2f0da11695fdb9a3c483548b79a89 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 2 Jun 2019 19:49:17 -0700 Subject: see if an interface can store the outside values also finally fixed the splash area logic Signed-off-by: Jeff Carr --- area.go | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'area.go') diff --git a/area.go b/area.go index 49e4b20..aee0803 100644 --- a/area.go +++ b/area.go @@ -14,7 +14,6 @@ func makeGenericArea(gb *GuiBox, newText *ui.AttributedString, custom func(*GuiB newB = CreateFontButton(gb, "AREA") newB.Box = gb newB.Custom = custom -// newB.GW = gb.Window gw := gb.Window // initialize the GuiArea{} @@ -116,10 +115,21 @@ func ShowTextBox(gw *GuiWindow, newText *ui.AttributedString, custom func(*GuiBu } log.Println("ShowTextBox() START gw =", gw) - box := InitGuiBox(gw, nil, ui.NewVerticalBox(), "SplashArea3") + var newbox *GuiBox + newbox = new(GuiBox) + newbox.Window = gw + newbox.Name = "Hbox1" + hbox := ui.NewVerticalBox() + newbox.UiBox = hbox - makeGenericArea(box, newText, custom) - box.UiBox.Append(box.Window.Area.UiArea, true) + // TODO: allow padded & axis here + hbox.SetPadded(true) - return box + add(gw.BoxMap["MAINBOX"], newbox) + // box := InitGuiBox(gw, nil, ui.NewVerticalBox(), "SplashArea3") + + makeGenericArea(newbox, newText, custom) + newbox.UiBox.Append(newbox.Window.Area.UiArea, true) + + return newbox } -- cgit v1.2.3