dasjkhkljashdkjsha
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user