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