2023-08-08 10:46:19 -06:00
|
|
|
package objects
|
|
|
|
|
|
|
|
import "git.tebibyte.media/tomo/tomo"
|
|
|
|
|
|
|
|
// 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() }
|
2024-05-26 15:21:58 -06:00
|
|
|
tomo.Apply(this, tomo.R("objects", "Label", ""))
|
2023-08-09 09:35:24 -06:00
|
|
|
this.SetText(text)
|
|
|
|
return this
|
2023-08-08 10:46:19 -06:00
|
|
|
}
|