LabelSwatch, LabelCheckbox changing their labels

This commit is contained in:
Sasha Koshka 2024-08-24 20:03:48 -04:00
parent f0c334c278
commit 6f8d5cc426
2 changed files with 10 additions and 0 deletions

View File

@ -47,6 +47,11 @@ func (this *LabelCheckbox) SetFocused (focused bool) {
this.checkbox.SetFocused(focused)
}
// SetText sets the text label of the checkbox.
func (this *LabelCheckbox) SetText (text string) {
this.label.SetText(text)
}
// Value returns the value of the checkbox.
func (this *LabelCheckbox) Value () bool {
return this.checkbox.Value()

View File

@ -49,6 +49,11 @@ func (this *LabelSwatch) SetFocused (focused bool) {
this.swatch.SetFocused(focused)
}
// SetText sets the text label of the swatch.
func (this *LabelSwatch) SetText (text string) {
this.label.SetText(text)
}
// Value returns the color of the swatch.
func (this *LabelSwatch) Value () color.Color {
return this.swatch.Value()