diff --git a/account1/addAccount.go b/account1/addAccount.go index 4d7a8b3..bbd4858 100644 --- a/account1/addAccount.go +++ b/account1/addAccount.go @@ -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 +} diff --git a/test2/main.go b/test2/main.go index 76a5049..d539fbc 100644 --- a/test2/main.go +++ b/test2/main.go @@ -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" + } } }