another attempt

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2019-05-22 11:27:46 -07:00
parent 28a96010fd
commit 75188b10ca
2 changed files with 24 additions and 0 deletions

View File

@ -5,6 +5,7 @@ import "log"
import "github.com/andlabs/ui"
import _ "github.com/andlabs/ui/winmanifest"
import "git.wit.com/wit/gui"
// import "github.com/davecgh/go-spew/spew"
func AddAccountWindow() {
@ -47,3 +48,20 @@ func AddAccountWindow() {
vbox.Append(okButton, false)
// END add account hbox
}
func AddAccountBox(vbox *ui.Box, custom func(int, string)) *ui.Box {
newbox := ui.NewVerticalBox()
newbox.SetPadded(true)
// create new account button
newButton := gui.CreateButton("Create New Account", "CLOSE", custom)
newbox.Append(newButton, false)
newbox.Append(ui.NewHorizontalSeparator(), false)
okButton := gui.CreateButton("I Have an Account", "CLOSE", custom)
newbox.Append(okButton, false)
vbox.Append(newbox, true)
return vbox
}

View File

@ -75,6 +75,12 @@ func watchGUI() {
smallBox.Destroy()
state = "account1"
}
if (state == "account1") {
log.Println("Display the splash box")
smallBox = account1.AddAccountBox(cloudBox, splashClose)
// newbox.SetPadded(true)
state = "done"
}
}
}