MCPcopy Create free account
hub / github.com/SolarLune/masterplan / Label

Struct Label

gui.go:1531–1566  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1529}
1530
1531type Label struct {
1532 Rect *sdl.FRect
1533 Text []rune
1534 TextureDirty bool
1535 RendererResult *TextRendererResult
1536 WorldSpace bool
1537 Highlighter *Highlighter
1538
1539 ScrollW int // The index for scrolling the label when typing or clicking and its length is longer than its visible length
1540 Editable bool
1541 Editing bool
1542 DrawLineUnderTitle bool
1543
1544 Selection *TextSelection
1545 SelectWordIndexStart int
1546 SelectWordIndexEnd int
1547
1548 RegexString string
1549
1550 HorizontalAlignment string
1551 Offset Vector
1552 Alpha float32
1553 currentAlpha float32
1554 OnChange func()
1555 OnClickOut func()
1556 textChanged bool
1557 maxSize Vector
1558 Property *Property
1559 MaxLength int
1560 MousedOver bool
1561 Color Color
1562
1563 RotatedVertical bool
1564
1565 MultiEditing bool
1566}
1567
1568// NewLabel creates a new Label object. a rect of nil means the Label will default to a rectangle of the necessary size to fully display the text given.
1569func NewLabel(text string, rect *sdl.FRect, worldSpace bool, horizontalAlignment string) *Label {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected