summaryrefslogtreecommitdiff
path: root/structs.go
diff options
context:
space:
mode:
Diffstat (limited to 'structs.go')
-rw-r--r--structs.go17
1 files changed, 15 insertions, 2 deletions
diff --git a/structs.go b/structs.go
index fa7c42c..a48f1c0 100644
--- a/structs.go
+++ b/structs.go
@@ -124,7 +124,7 @@ func (s GuiBox) InitTab(title string) {
s.Window.UiTab = tab
}
-func (s GuiBox) AddTab(title string) {
+func (s GuiBox) AddTab(title string, custom ui.Control) {
if (s.Window == nil) {
return
}
@@ -134,7 +134,20 @@ func (s GuiBox) AddTab(title string) {
tab := s.Window.UiTab
- tab.Append(title, InitBlankWindow())
+ tab.Append(title, custom)
+}
+
+func (s GuiBox) AddDemoTab(title string) {
+ if (s.Window == nil) {
+ return
+ }
+ if (s.Window.UiTab == nil) {
+ return
+ }
+
+ tab := s.Window.UiTab
+
+ tab.Append(title, makeWindowTemplate())
}
// Note: every mouse click is handled