Coherent commit messages are for weaklings

This commit is contained in:
Sasha Koshka 2023-04-15 18:51:42 -04:00
parent c0b205c6f0
commit 0cd7fb9be9
4 changed files with 16 additions and 0 deletions

View File

@ -126,6 +126,10 @@ func (element *Checkbox) SetConfig (new tomo.Config) {
element.entity.Invalidate()
}
func (element *Checkbox) HandleFocusChange () {
element.entity.Invalidate()
}
func (element *Checkbox) HandleMouseDown (x, y int, button input.Button) {
if !element.Enabled() { return }
element.Focus()

View File

@ -94,6 +94,10 @@ func (element *Slider) SetEnabled (enabled bool) {
element.entity.Invalidate()
}
func (element *Slider) HandleFocusChange () {
element.entity.Invalidate()
}
func (element *Slider) HandleMouseDown (x, y int, button input.Button) {
if !element.Enabled() { return }
element.Focus()

View File

@ -97,6 +97,10 @@ func (element *Switch) Draw (destination canvas.Canvas) {
element.drawer.Draw(destination, foreground, offset)
}
func (element *Switch) HandleFocusChange () {
element.entity.Invalidate()
}
func (element *Switch) HandleMouseDown (x, y int, button input.Button) {
if !element.Enabled() { return }
element.Focus()

View File

@ -134,6 +134,10 @@ func (element *TextBox) Draw (destination canvas.Canvas) {
}
}
func (element *TextBox) HandleFocusChange () {
element.entity.Invalidate()
}
func (element *TextBox) HandleMouseDown (x, y int, button input.Button) {
if !element.Enabled() { return }
element.Focus()