try to map the windows
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
cbc96f2b61
commit
0d1b204d9e
|
@ -51,7 +51,7 @@ func makeCloudInfoBox(gw *gui.GuiWindow) {
|
||||||
log.Println("makeCloudInfoBox() END")
|
log.Println("makeCloudInfoBox() END")
|
||||||
}
|
}
|
||||||
|
|
||||||
func initWindow(gw *gui.GuiWindow, name string) *gui.GuiWindow {
|
func initWindow(gw *gui.GuiWindow, name string, axis int) *gui.GuiBox {
|
||||||
window := gui.Data.WindowMap[name]
|
window := gui.Data.WindowMap[name]
|
||||||
if (window != nil) {
|
if (window != nil) {
|
||||||
box := window.BoxMap["MAINBOX"]
|
box := window.BoxMap["MAINBOX"]
|
||||||
|
@ -60,14 +60,20 @@ func initWindow(gw *gui.GuiWindow, name string) *gui.GuiWindow {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
// if there is not an account, then go to 'make account'
|
// if there is not an account, then go to 'make account'
|
||||||
return gui.InitGuiWindow("createAccount", gw)
|
newWindow := gui.InitGuiWindow("createAccount", gw)
|
||||||
|
|
||||||
|
var box *gui.GuiBox
|
||||||
|
if (axis == gui.Xaxis) {
|
||||||
|
box = gui.HardBox(newWindow, gui.Xaxis, name)
|
||||||
|
} else {
|
||||||
|
box = gui.HardBox(newWindow, gui.Yaxis, name)
|
||||||
|
}
|
||||||
|
return box
|
||||||
}
|
}
|
||||||
|
|
||||||
func createAccount(gw *gui.GuiWindow) {
|
func createAccount(gw *gui.GuiWindow) {
|
||||||
gw = initWindow(gw, "createAccount")
|
box := initWindow(gw, "Create New Account", gui.Yaxis)
|
||||||
if (gw == nil) { return }
|
if (box == nil) { return }
|
||||||
|
|
||||||
box := gui.HardBox(gw, gui.Yaxis, "Create New Account")
|
|
||||||
|
|
||||||
// make a place for someone to enter their subdomain
|
// make a place for someone to enter their subdomain
|
||||||
hardXbox := gui.HardBox(gw, gui.Xaxis, "subdomain test")
|
hardXbox := gui.HardBox(gw, gui.Xaxis, "subdomain test")
|
||||||
|
|
11
gui-debug.go
11
gui-debug.go
|
@ -20,16 +20,15 @@ func debugClick(b *gui.GuiButton) {
|
||||||
|
|
||||||
// if there is not an account, then go to 'make account'
|
// if there is not an account, then go to 'make account'
|
||||||
// gw = gui.InitGuiWindow("debugClick", gw)
|
// gw = gui.InitGuiWindow("debugClick", gw)
|
||||||
gw = initWindow(gw, "Debugging")
|
box := initWindow(gw, "Debugging", gui.Yaxis)
|
||||||
|
if (box == nil) { return }
|
||||||
log.Println("debugClick() AddGenericBox() START")
|
log.Println("debugClick() initWindow() END")
|
||||||
box := gui.HardBox(gw, gui.Yaxis, "debugging")
|
|
||||||
log.Println("debugClick() AddGenericBox() END box =", box)
|
|
||||||
|
|
||||||
makeButton(box, nil, nil, "empty", "SUBDOMAIN", nil)
|
makeButton(box, nil, nil, "empty", "SUBDOMAIN", nil)
|
||||||
gui.HorizontalBreak(box)
|
gui.HorizontalBreak(box)
|
||||||
makeButton(box, nil, nil, "Create Subdomain Account", "ADD", addSubdomainClick)
|
makeButton(box, nil, nil, "Create Subdomain Account", "ADD", addSubdomainClick)
|
||||||
hardXbox := gui.HardBox(gw, gui.Xaxis, "subdomain test")
|
|
||||||
|
hardXbox := gui.HardBox(box.Window, gui.Xaxis, "subdomain test")
|
||||||
Ybox1 := gui.NewBox(hardXbox, gui.Yaxis, "subdomain Y test")
|
Ybox1 := gui.NewBox(hardXbox, gui.Yaxis, "subdomain Y test")
|
||||||
Xbox1 := gui.NewBox(Ybox1, gui.Xaxis, "subdomain Y test")
|
Xbox1 := gui.NewBox(Ybox1, gui.Xaxis, "subdomain Y test")
|
||||||
makeButton(Xbox1, nil, nil, "ping", "SUBDOMAIN", runPingClick)
|
makeButton(Xbox1, nil, nil, "ping", "SUBDOMAIN", runPingClick)
|
||||||
|
|
Loading…
Reference in New Issue