4 protected string m_sIconWidgetName;
7 protected string m_sNameWidgetName;
10 protected TextWidget m_NameWidget;
13 override void InitToolbarItem(Widget widget)
30 slotManager.InsertSlotExternal(entity, slot);
35 Debug.Error2(ToString(),
string.Format(
"SCR_EditableEntitySlotManagerUIComponent UI component is missing on %1!", widget.GetName()));
41 m_NameWidget = TextWidget.Cast(widget.FindAnyWidget(m_sNameWidgetName));
45 GetGame().GetCallqueue().CallLater(SetName, 1,
false, entity);
48 if (entity.GetOnUIRefresh())
50 entity.GetOnUIRefresh().Insert(RefreshName);
60 int playerID = entity.GetPlayerID();
63 m_NameWidget.SetText(
GetGame().GetPlayerManager().GetPlayerName(playerID));
69 info.SetNameTo(m_NameWidget);
74 protected void RefreshName()
80 override void HandlerDeattached(Widget w)
82 super.HandlerDeattached(w);
85 m_Entity.GetOnUIRefresh().Remove(RefreshName);