start making tabs to test behavior under Windows

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2019-05-22 17:15:22 -07:00
parent 41e9f95789
commit 3367793ea5
2 changed files with 13 additions and 10 deletions

View File

@ -49,7 +49,7 @@ func AddAccountWindow() {
// END add account hbox // END add account hbox
} }
func AddAccountBox(vbox *ui.Box, custom func(int, string)) *ui.Box { func AddAccountBox(junk *ui.Box, custom func(int, string)) *ui.Box {
newbox := ui.NewVerticalBox() newbox := ui.NewVerticalBox()
newbox.SetPadded(true) newbox.SetPadded(true)
@ -62,6 +62,5 @@ func AddAccountBox(vbox *ui.Box, custom func(int, string)) *ui.Box {
okButton := gui.CreateButton("I Have an Account", "CLOSE", custom) okButton := gui.CreateButton("I Have an Account", "CLOSE", custom)
newbox.Append(okButton, false) newbox.Append(okButton, false)
vbox.Append(newbox, true) return newbox
return vbox
} }

View File

@ -52,7 +52,9 @@ func watchGUI() {
if (state == "splash") { if (state == "splash") {
log.Println("Display the splash box") log.Println("Display the splash box")
smallBox = account1.AddAccountBox(cloudBox, splashClose) smallBox = account1.AddAccountBox(nil, splashClose)
cloudTab.Append("Intro", smallBox)
cloudTab.SetMargined(0, true)
// newbox.SetPadded(true) // newbox.SetPadded(true)
state = "done" state = "done"
} }
@ -66,7 +68,9 @@ func watchGUI() {
} }
if (state == "account1") { if (state == "account1") {
log.Println("Display the splash box") log.Println("Display the splash box")
smallBox = splash.ShowSplashBox(cloudBox, nil, splashClose) smallBox = splash.ShowSplashBox(nil, nil, splashClose)
cloudTab.Append("WIT Account", smallBox)
cloudTab.SetMargined(0, true)
// newbox.SetPadded(true) // newbox.SetPadded(true)
state = "done" state = "done"
} }
@ -90,15 +94,15 @@ func makeCloudWindow() {
// cloudWindow.SetChild(cloudBox) // cloudWindow.SetChild(cloudBox)
// cloudWindow.SetMargined(true) // cloudWindow.SetMargined(true)
tab := ui.NewTab() cloudTab = ui.NewTab()
cloudWindow.SetChild(tab) cloudWindow.SetChild(cloudTab)
cloudWindow.SetMargined(true) cloudWindow.SetMargined(true)
cloudBox = splash.ShowSplashBox(nil, nil, buttonClick) cloudBox = splash.ShowSplashBox(nil, nil, buttonClick)
tab.Append("WIT Splash", cloudBox) cloudTab.Append("WIT Splash", cloudBox)
tab.SetMargined(0, true) cloudTab.SetMargined(0, true)
cloudWindow.Show() cloudWindow.Show()
state = "done" state = "splash"
} }