summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--button.go3
-rw-r--r--new-structs.go1
-rw-r--r--structs.go1
-rw-r--r--window.go5
4 files changed, 9 insertions, 1 deletions
diff --git a/button.go b/button.go
index 5510ed7..755d9ab 100644
--- a/button.go
+++ b/button.go
@@ -54,6 +54,9 @@ func (n *Node) CreateFontButton(action string) *Node {
n.Dump()
})
n.uiBox.Append(n.uiFontButton, Config.Stretchy)
+
+ // TODO: implement Grid
+ n.uiGrid = ui.NewGrid()
return n
}
diff --git a/new-structs.go b/new-structs.go
index e6b947e..f806696 100644
--- a/new-structs.go
+++ b/new-structs.go
@@ -67,6 +67,7 @@ type Node struct {
uiText *ui.EditableCombobox
uiMultilineEntry *ui.MultilineEntry
uiGroup *ui.Group
+ uiGrid *ui.Grid
}
func (n *Node) Parent() *Node {
diff --git a/structs.go b/structs.go
index d82e621..79b3fbf 100644
--- a/structs.go
+++ b/structs.go
@@ -23,6 +23,7 @@ type GuiConfig struct {
Width int
Height int
Stretchy bool
+ Menu bool
Exit func(*Node)
Debug bool
diff --git a/window.go b/window.go
index eb39e87..50f7073 100644
--- a/window.go
+++ b/window.go
@@ -86,7 +86,7 @@ func (n *Node) AddNode(title string) *Node {
}
func (n *Node) uiNewWindow(title string, x int, y int) {
- w := ui.NewWindow(title, x, y, false)
+ w := ui.NewWindow(title, x, y, Config.Menu)
w.SetBorderless(false)
f := Config.Exit
w.OnClosing(func(*ui.Window) bool {
@@ -126,6 +126,9 @@ func mapWindow(parent *Node, window *ui.Window, title string, x int, y int) *Nod
// it can be passed via the 'andlabs/ui' queue which, because it is
// cross platform, must pass UI changes into the OS threads (that is
// my guess).
+//
+// There is probably some way to pass arguements here that I'm can't think of right now
+//
func NewWindow() *Node {
title := Config.Title
w := Config.Width