diff options
| author | Jeff Carr <[email protected]> | 2019-06-02 12:08:53 -0700 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2019-06-02 12:08:53 -0700 |
| commit | 908e873d30bb3dd43cd2e010134af8c6ad8aa330 (patch) | |
| tree | 3b309050b97ec40080edac05e53b57846da9a2ae /box.go | |
| parent | 9dc15500bcc52cee3ebcb36d1e94fb1c6ce2a301 (diff) | |
cleanups
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'box.go')
| -rw-r--r-- | box.go | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -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 |
