summaryrefslogtreecommitdiff
path: root/box.go
diff options
context:
space:
mode:
Diffstat (limited to 'box.go')
-rw-r--r--box.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/box.go b/box.go
index 51e8b68..a8c2c46 100644
--- a/box.go
+++ b/box.go
@@ -53,6 +53,25 @@ func add(box *GuiBox, newbox *GuiBox) {
log.Println("gui.add() END")
}
+func InitGuiBox(gw *GuiWindow, box *GuiBox, uiBox *ui.Box, name string) *GuiBox {
+ log.Println("InitGuiBox() START")
+ var newGuiBox GuiBox
+ newGuiBox.UiBox = uiBox
+ newGuiBox.Window = gw
+ uiBox.SetPadded(true)
+
+ if (box != nil) {
+ log.Println("InitGuiBox() APPEND NEW BOX TO OLD BOX")
+ box.UiBox.Append(uiBox, false)
+ } else {
+ log.Println("InitGuiBox() APPEND NEW BOX TO TAB")
+ gw.UiTab.Append(name, uiBox)
+ }
+ gw.BoxMap[name] = &newGuiBox
+ log.Println("InitGuiBox() END")
+ return &newGuiBox
+}
+
func HardHorizontalBox(gw *GuiWindow) *GuiBox {
log.Println("HardHorizontalBreak START")
var newbox *GuiBox