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

Method applyStyle

gui/button.go:198–205  ·  view source on GitHub ↗

applyStyle applies the specified button style

(bs *ButtonStyle)

Source from the content-addressed store, hash-verified

196
197// applyStyle applies the specified button style
198func (b *Button) applyStyle(bs *ButtonStyle) {
199
200 b.Panel.ApplyStyle(&bs.PanelStyle)
201 if b.icon != nil {
202 b.icon.SetColor4(&bs.FgColor)
203 }
204 b.Label.SetColor4(&bs.FgColor)
205}
206
207// recalc recalculates all dimensions and position from inside out
208func (b *Button) recalc() {

Callers 1

updateMethod · 0.95

Calls 2

ApplyStyleMethod · 0.45
SetColor4Method · 0.45

Tested by

no test coverage detected