Example files now reflect new API change
This commit is contained in:
parent
801c3ef6f5
commit
58c3b23a99
@ -42,7 +42,7 @@ func run () {
|
||||
button := basic.NewButton("What")
|
||||
button.OnClick(tomo.Stop)
|
||||
container.Adopt(button, false)
|
||||
button.Select()
|
||||
button.Focus()
|
||||
|
||||
window.OnClose(tomo.Stop)
|
||||
window.Show()
|
||||
|
@ -22,7 +22,7 @@ func run () {
|
||||
container.Adopt(cancel, false)
|
||||
okButton := basic.NewButton("OK")
|
||||
container.Adopt(okButton, false)
|
||||
okButton.Select()
|
||||
okButton.Focus()
|
||||
|
||||
window.OnClose(tomo.Stop)
|
||||
window.Show()
|
||||
|
@ -35,7 +35,7 @@ func run () {
|
||||
container.Adopt(button0, false)
|
||||
container.Adopt(button1, false)
|
||||
container.Adopt(button2, false)
|
||||
button0.Select()
|
||||
button0.Focus()
|
||||
})
|
||||
},
|
||||
"wet": func () {
|
||||
@ -52,7 +52,7 @@ func run () {
|
||||
container.Adopt(label, true)
|
||||
container.Adopt(button0, false)
|
||||
container.Adopt(button1, false)
|
||||
button0.Select()
|
||||
button0.Focus()
|
||||
})
|
||||
},
|
||||
"house": func () {
|
||||
@ -69,7 +69,7 @@ func run () {
|
||||
container.Adopt(label, true)
|
||||
container.Adopt(button1, false)
|
||||
container.Adopt(button0, false)
|
||||
button1.Select()
|
||||
button1.Focus()
|
||||
})
|
||||
},
|
||||
"inside": func () {
|
||||
@ -86,7 +86,7 @@ func run () {
|
||||
container.Warp (func () {
|
||||
container.Adopt(label, true)
|
||||
container.Adopt(button0, false)
|
||||
button0.Select()
|
||||
button0.Focus()
|
||||
})
|
||||
},
|
||||
"bear": func () {
|
||||
@ -103,7 +103,7 @@ func run () {
|
||||
container.Adopt(label, true)
|
||||
container.Adopt(button0, false)
|
||||
container.Adopt(button1, false)
|
||||
button0.Select()
|
||||
button0.Focus()
|
||||
})
|
||||
},
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ func run () {
|
||||
"You are wacky")
|
||||
})
|
||||
container.Adopt(infoButton, false)
|
||||
infoButton.Select()
|
||||
infoButton.Focus()
|
||||
|
||||
questionButton := basic.NewButton("popups.DialogKindQuestion")
|
||||
questionButton.OnClick (func () {
|
||||
|
@ -25,14 +25,14 @@ func run () {
|
||||
container.Adopt(basic.NewLabel("Draw here:", false), false)
|
||||
container.Adopt(testing.NewMouse(), true)
|
||||
container.Adopt(okButton, false)
|
||||
okButton.Select()
|
||||
okButton.Focus()
|
||||
})
|
||||
okButton.OnClick(tomo.Stop)
|
||||
|
||||
container.Adopt(label, true)
|
||||
container.Adopt(button, false)
|
||||
container.Adopt(okButton, false)
|
||||
okButton.Select()
|
||||
okButton.Focus()
|
||||
|
||||
window.OnClose(tomo.Stop)
|
||||
window.Show()
|
||||
|
@ -43,7 +43,7 @@ func NewDialog (
|
||||
button := basic.NewButton("OK")
|
||||
button.OnClick(window.Close)
|
||||
container.Adopt(button, false)
|
||||
button.Select()
|
||||
button.Focus()
|
||||
} else {
|
||||
var button *basic.Button
|
||||
for _, buttonDescriptor := range buttons {
|
||||
@ -55,7 +55,7 @@ func NewDialog (
|
||||
})
|
||||
container.Adopt(button, false)
|
||||
}
|
||||
button.Select()
|
||||
button.Focus()
|
||||
}
|
||||
|
||||
window.Show()
|
||||
|
Reference in New Issue
Block a user