Update examples to use new API
This commit is contained in:
@@ -7,7 +7,6 @@ import _ "embed"
|
||||
import "git.tebibyte.media/tomo/tomo"
|
||||
import "git.tebibyte.media/tomo/nasin"
|
||||
import "git.tebibyte.media/tomo/objects"
|
||||
import "git.tebibyte.media/tomo/tomo/theme"
|
||||
import "git.tebibyte.media/tomo/objects/layouts"
|
||||
|
||||
//go:embed LICENSE
|
||||
@@ -30,7 +29,7 @@ func (this *Application) Init () error {
|
||||
checkbox.SetFocused(true)
|
||||
|
||||
okButtok := objects.NewButton("OK")
|
||||
okButtok.SetIcon(theme.IconStatusOkay)
|
||||
okButtok.SetIcon(tomo.IconDialogOkay)
|
||||
okButtok.OnClick(func () {
|
||||
if checkbox.Value() {
|
||||
window.Close()
|
||||
@@ -38,7 +37,7 @@ func (this *Application) Init () error {
|
||||
dialog, _ := objects.NewDialogOk (
|
||||
objects.DialogInformation, window,
|
||||
"", "You must read and agree to the license terms", nil)
|
||||
dialog.Show()
|
||||
dialog.SetVisible(true)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -54,7 +53,7 @@ func (this *Application) Init () error {
|
||||
okButtok)))
|
||||
|
||||
window.OnClose(tomo.Stop)
|
||||
window.Show()
|
||||
window.SetVisible(true)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user