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

Method CopyFields

gui/imagelabel.go:176–186  ·  view source on GitHub ↗

CopyFields copies another image label icon/image and text to this one

(other *ImageLabel)

Source from the content-addressed store, hash-verified

174
175// CopyFields copies another image label icon/image and text to this one
176func (il *ImageLabel) CopyFields(other *ImageLabel) {
177
178 il.label.SetText(other.label.Text())
179 if other.icon != nil {
180 il.SetIcon(other.icon.Text())
181 }
182 if other.image != nil {
183 // TODO li.SetImage(other.image.Clone())
184 }
185 il.recalc()
186}
187
188// applyStyle applies the specified image label style
189func (il *ImageLabel) applyStyle(s *ImageLabelStyle) {

Callers 1

copySelectedMethod · 0.80

Calls 4

SetIconMethod · 0.95
recalcMethod · 0.95
SetTextMethod · 0.45
TextMethod · 0.45

Tested by

no test coverage detected