2023-08-08 10:46:19 -06:00
|
|
|
package objects
|
|
|
|
|
|
|
|
import "git.tebibyte.media/tomo/tomo"
|
|
|
|
import "git.tebibyte.media/tomo/tomo/theme"
|
|
|
|
|
|
|
|
// Label is a simple text label.
|
2023-08-09 09:35:24 -06:00
|
|
|
type Label struct {
|
|
|
|
tomo.TextBox
|
|
|
|
}
|
2023-08-08 10:46:19 -06:00
|
|
|
|
|
|
|
// NewLabel creates a new text label.
|
2023-08-09 09:35:24 -06:00
|
|
|
func NewLabel (text string) *Label {
|
|
|
|
this := &Label { TextBox: tomo.NewTextBox() }
|
2023-08-10 15:52:01 -06:00
|
|
|
theme.Apply(this, theme.R("objects", "Label", ""))
|
2023-08-09 09:35:24 -06:00
|
|
|
this.SetText(text)
|
|
|
|
return this
|
2023-08-08 10:46:19 -06:00
|
|
|
}
|
|
|
|
|