SMALL: some stuff hanging around
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
12cc3882f5
commit
c91d7d52b8
|
@ -54,6 +54,9 @@ func (n *Node) CreateFontButton(action string) *Node {
|
||||||
n.Dump()
|
n.Dump()
|
||||||
})
|
})
|
||||||
n.uiBox.Append(n.uiFontButton, Config.Stretchy)
|
n.uiBox.Append(n.uiFontButton, Config.Stretchy)
|
||||||
|
|
||||||
|
// TODO: implement Grid
|
||||||
|
n.uiGrid = ui.NewGrid()
|
||||||
return n
|
return n
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -67,6 +67,7 @@ type Node struct {
|
||||||
uiText *ui.EditableCombobox
|
uiText *ui.EditableCombobox
|
||||||
uiMultilineEntry *ui.MultilineEntry
|
uiMultilineEntry *ui.MultilineEntry
|
||||||
uiGroup *ui.Group
|
uiGroup *ui.Group
|
||||||
|
uiGrid *ui.Grid
|
||||||
}
|
}
|
||||||
|
|
||||||
func (n *Node) Parent() *Node {
|
func (n *Node) Parent() *Node {
|
||||||
|
|
|
@ -23,6 +23,7 @@ type GuiConfig struct {
|
||||||
Width int
|
Width int
|
||||||
Height int
|
Height int
|
||||||
Stretchy bool
|
Stretchy bool
|
||||||
|
Menu bool
|
||||||
Exit func(*Node)
|
Exit func(*Node)
|
||||||
|
|
||||||
Debug bool
|
Debug bool
|
||||||
|
|
|
@ -86,7 +86,7 @@ func (n *Node) AddNode(title string) *Node {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (n *Node) uiNewWindow(title string, x int, y int) {
|
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)
|
w.SetBorderless(false)
|
||||||
f := Config.Exit
|
f := Config.Exit
|
||||||
w.OnClosing(func(*ui.Window) bool {
|
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
|
// 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
|
// cross platform, must pass UI changes into the OS threads (that is
|
||||||
// my guess).
|
// my guess).
|
||||||
|
//
|
||||||
|
// There is probably some way to pass arguements here that I'm can't think of right now
|
||||||
|
//
|
||||||
func NewWindow() *Node {
|
func NewWindow() *Node {
|
||||||
title := Config.Title
|
title := Config.Title
|
||||||
w := Config.Width
|
w := Config.Width
|
||||||
|
|
Loading…
Reference in New Issue