more button tests
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
0960f2a744
commit
7638127519
10
gui.go
10
gui.go
|
@ -191,8 +191,16 @@ func defaultButtonClick(button *ui.Button) {
|
||||||
log.Println("Data.allButtons =", key, foo)
|
log.Println("Data.allButtons =", key, foo)
|
||||||
if Data.allButtons[key].B == button {
|
if Data.allButtons[key].B == button {
|
||||||
log.Println("\tBUTTON MATCHED")
|
log.Println("\tBUTTON MATCHED")
|
||||||
|
log.Println("\tData.allButtons[key].name", Data.allButtons[key].name)
|
||||||
|
log.Println("\tData.allButtons[key].note", Data.allButtons[key].note)
|
||||||
if Data.allButtons[key].custom != nil {
|
if Data.allButtons[key].custom != nil {
|
||||||
Data.allButtons[key].custom(42, "something foo")
|
if Data.allButtons[key].note == "BACK" {
|
||||||
|
Data.allButtons[key].custom(42, "BACK")
|
||||||
|
} else if Data.allButtons[key].note == "CLOSE" {
|
||||||
|
Data.allButtons[key].custom(42, "CLOSE")
|
||||||
|
} else {
|
||||||
|
Data.allButtons[key].custom(42, "something foo")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
12
tabWindow.go
12
tabWindow.go
|
@ -23,8 +23,8 @@ func buttonClick(i int, s string) {
|
||||||
func ShowAccountQuestionTab() {
|
func ShowAccountQuestionTab() {
|
||||||
Data.cloudTab.Delete(0)
|
Data.cloudTab.Delete(0)
|
||||||
|
|
||||||
log.Println("Sleep(1000)")
|
log.Println("Sleep(200)")
|
||||||
time.Sleep(1000 * time.Millisecond)
|
time.Sleep(200 * time.Millisecond)
|
||||||
|
|
||||||
Data.smallBox = AddAccountQuestionBox(nil, buttonClick)
|
Data.smallBox = AddAccountQuestionBox(nil, buttonClick)
|
||||||
Data.cloudTab.InsertAt("New Account?", 0, Data.smallBox)
|
Data.cloudTab.InsertAt("New Account?", 0, Data.smallBox)
|
||||||
|
@ -34,8 +34,8 @@ func ShowAccountQuestionTab() {
|
||||||
func ShowAccountTab() {
|
func ShowAccountTab() {
|
||||||
Data.cloudTab.Delete(0)
|
Data.cloudTab.Delete(0)
|
||||||
|
|
||||||
log.Println("Sleep(1000)")
|
log.Println("Sleep(200)")
|
||||||
time.Sleep(1000 * time.Millisecond)
|
time.Sleep(200 * time.Millisecond)
|
||||||
|
|
||||||
Data.smallBox = AddAccountBox(buttonClick)
|
Data.smallBox = AddAccountBox(buttonClick)
|
||||||
Data.cloudTab.InsertAt("Add Account", 0, Data.smallBox)
|
Data.cloudTab.InsertAt("Add Account", 0, Data.smallBox)
|
||||||
|
@ -45,8 +45,8 @@ func ShowAccountTab() {
|
||||||
func ShowMainTab() {
|
func ShowMainTab() {
|
||||||
Data.cloudTab.Delete(0)
|
Data.cloudTab.Delete(0)
|
||||||
|
|
||||||
log.Println("Sleep(1000)")
|
log.Println("Sleep(200)")
|
||||||
time.Sleep(1000 * time.Millisecond)
|
time.Sleep(200 * time.Millisecond)
|
||||||
|
|
||||||
Data.smallBox = makeCloudInfoBox(buttonClick)
|
Data.smallBox = makeCloudInfoBox(buttonClick)
|
||||||
Data.cloudTab.InsertAt("Main", 0, Data.smallBox)
|
Data.cloudTab.InsertAt("Main", 0, Data.smallBox)
|
||||||
|
|
Loading…
Reference in New Issue