dasjkhkljashdkjsha

This commit is contained in:
2023-01-10 11:51:46 -05:00
parent 34848f616b
commit b1fd021120
7 changed files with 178 additions and 17 deletions

View File

@@ -23,6 +23,7 @@ func NewButton (text string) (element *Button) {
element = &Button { enabled: true }
element.Core, element.core = core.NewCore(element)
element.drawer.SetFace(theme.FontFaceRegular())
element.core.SetSelectable(true)
element.SetText(text)
return
}
@@ -112,10 +113,6 @@ func (element *Button) AdvanceSelection (direction int) (ok bool) {
return
}
func (element *Button) Selectable () (selectable bool) {
return element.enabled
}
func (element *Button) Select () {
element.core.Select()
}
@@ -123,6 +120,7 @@ func (element *Button) Select () {
func (element *Button) SetEnabled (enabled bool) {
if element.enabled == enabled { return }
element.enabled = enabled
element.core.SetSelectable(enabled)
if element.core.HasImage () {
element.draw()
element.core.PushAll()

View File

@@ -53,10 +53,6 @@ func (element *Label) SetText (text string) {
}
}
func (element *Label) Selectable () (selectable bool) {
return
}
func (element *Label) AdvanceSelection (direction int) (ok bool) {
return
}

View File

@@ -48,10 +48,6 @@ func (element *Test) Handle (event tomo.Event) {
return
}
func (element *Test) Selectable () (selectable bool) {
return
}
func (element *Test) AdvanceSelection (direction int) (ok bool) {
return
}