Update Tomo API

This commit is contained in:
Sasha Koshka 2024-05-27 15:22:18 -04:00
parent 6389556199
commit bd9dbb762d
6 changed files with 13 additions and 16 deletions

View File

@ -31,8 +31,7 @@ func NewCheckbox (value bool) *Checkbox {
func (this *Checkbox) SetValue (value bool) { func (this *Checkbox) SetValue (value bool) {
this.value = value this.value = value
if this.value { if this.value {
// FIXME: we need checkbox icons this.SetTextureCenter(tomo.IconCheckboxChecked.Texture(tomo.IconSizeSmall))
this.SetTextureCenter(tomo.Icon("").Texture(tomo.IconSizeSmall))
} else { } else {
this.SetTextureCenter(nil) this.SetTextureCenter(nil)
} }

View File

@ -75,8 +75,7 @@ func NewDialog (kind DialogKind, parent tomo.Window, title, message string, opti
// NewDialogOk creates a new dialog window with an OK option. // NewDialogOk creates a new dialog window with an OK option.
func NewDialogOk (kind DialogKind, parent tomo.Window, title, message string, onOk func ()) (*Dialog, error) { func NewDialogOk (kind DialogKind, parent tomo.Window, title, message string, onOk func ()) (*Dialog, error) {
okButton := NewButton("OK") okButton := NewButton("OK")
// FIXME: need dialog accept/reject action icons okButton.SetIcon(tomo.IconDialogOkay)
// okButton.SetIcon(tomo.IconStatusOkay)
okButton.OnClick(func () { okButton.OnClick(func () {
if onOk != nil { onOk() } if onOk != nil { onOk() }
}) })