Update Tomo API
This commit is contained in:
parent
6389556199
commit
bd9dbb762d
@ -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)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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() }
|
||||||
})
|
})
|
||||||