From 75188b10cacae955ae4a67524bfccc8589aa988a Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Wed, 22 May 2019 11:27:46 -0700 Subject: [PATCH] another attempt Signed-off-by: Jeff Carr --- account1/addAccount.go | 18 ++++++++++++++++++ test2/main.go | 6 ++++++ 2 files changed, 24 insertions(+) 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" + } } }