MCPcopy
hub / github.com/g3n/engine / SetColor

Method SetColor

gui/label.go:112–117  ·  view source on GitHub ↗

SetColor sets the text color. Alpha is set to 1 (opaque).

(color *math32.Color)

Source from the content-addressed store, hash-verified

110// SetColor sets the text color.
111// Alpha is set to 1 (opaque).
112func (l *Label) SetColor(color *math32.Color) *Label {
113
114 l.style.FgColor.FromColor(color, 1.0)
115 l.SetText(l.text)
116 return l
117}
118
119// SetColor4 sets the text color.
120func (l *Label) SetColor4(color4 *math32.Color4) *Label {

Callers 2

SetTextMethod · 0.45
setTextCaretMethod · 0.45

Calls 2

SetTextMethod · 0.95
FromColorMethod · 0.80

Tested by

no test coverage detected