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

Method SetBgColor

gui/label.go:135–141  ·  view source on GitHub ↗

SetBgColor sets the background color. The color alpha is set to 1.0

(color *math32.Color)

Source from the content-addressed store, hash-verified

133// SetBgColor sets the background color.
134// The color alpha is set to 1.0
135func (l *Label) SetBgColor(color *math32.Color) *Label {
136
137 l.style.BgColor.FromColor(color, 1.0)
138 l.Panel.SetColor4(&l.style.BgColor)
139 l.SetText(l.text)
140 return l
141}
142
143// SetBgColor4 sets the background color.
144func (l *Label) SetBgColor4(color *math32.Color4) *Label {

Callers

nothing calls this directly

Calls 3

SetTextMethod · 0.95
FromColorMethod · 0.80
SetColor4Method · 0.45

Tested by

no test coverage detected