parent
28a96010fd
commit
75188b10ca
|
@ -5,6 +5,7 @@ import "log"
|
||||||
import "github.com/andlabs/ui"
|
import "github.com/andlabs/ui"
|
||||||
import _ "github.com/andlabs/ui/winmanifest"
|
import _ "github.com/andlabs/ui/winmanifest"
|
||||||
|
|
||||||
|
import "git.wit.com/wit/gui"
|
||||||
// import "github.com/davecgh/go-spew/spew"
|
// import "github.com/davecgh/go-spew/spew"
|
||||||
|
|
||||||
func AddAccountWindow() {
|
func AddAccountWindow() {
|
||||||
|
@ -47,3 +48,20 @@ func AddAccountWindow() {
|
||||||
vbox.Append(okButton, false)
|
vbox.Append(okButton, false)
|
||||||
// END add account hbox
|
// 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
|
||||||
|
}
|
||||||
|
|
|
@ -75,6 +75,12 @@ func watchGUI() {
|
||||||
smallBox.Destroy()
|
smallBox.Destroy()
|
||||||
state = "account1"
|
state = "account1"
|
||||||
}
|
}
|
||||||
|
if (state == "account1") {
|
||||||
|
log.Println("Display the splash box")
|
||||||
|
smallBox = account1.AddAccountBox(cloudBox, splashClose)
|
||||||
|
// newbox.SetPadded(true)
|
||||||
|
state = "done"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue