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

Method SetText

gui/menu.go:600–609  ·  view source on GitHub ↗

SetText sets the text of this menu item

(text string)

Source from the content-addressed store, hash-verified

598
599// SetText sets the text of this menu item
600func (mi *MenuItem) SetText(text string) *MenuItem {
601
602 if mi.label == nil {
603 return mi
604 }
605 mi.label.SetText(text)
606 mi.update()
607 mi.menu.recalc()
608 return mi
609}
610
611// SetShortcut sets the keyboard shortcut of this menu item
612func (mi *MenuItem) SetShortcut(mods window.ModifierKey, key window.Key) *MenuItem {

Callers

nothing calls this directly

Calls 2

updateMethod · 0.95
recalcMethod · 0.45

Tested by

no test coverage detected