mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
added Disable method
This commit is contained in:
parent
295e2f2099
commit
9b7f31877d
@ -3,4 +3,5 @@ package wtf
|
||||
type Enabler interface {
|
||||
Disabled() bool
|
||||
Enabled() bool
|
||||
Disable()
|
||||
}
|
||||
|
@ -61,6 +61,10 @@ func (widget *TextWidget) Enabled() bool {
|
||||
return widget.enabled
|
||||
}
|
||||
|
||||
func (widget *TextWidget) Disable() {
|
||||
widget.enabled = false
|
||||
}
|
||||
|
||||
func (widget *TextWidget) Focusable() bool {
|
||||
return widget.enabled && widget.focusable
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user