3 protected static const string WIDGET_TEXT =
"Text";
4 protected static const string WIDGET_ICON =
"Icon";
5 protected static const string WIDGET_EXTENDED_ICON =
"Icon_ExtendablePrefabs";
8 protected Widget m_wExtendedIcon;
21 SCR_EditableCommentComponent comment = SCR_EditableCommentComponent.Cast(entity);
25 TextWidget textWidget = TextWidget.Cast(widget.FindAnyWidget(WIDGET_TEXT));
27 comment.ApplyTo(textWidget);
29 ImageWidget iconWidget = ImageWidget.Cast(widget.FindAnyWidget(WIDGET_ICON));
31 comment.ApplyTo(iconWidget);
34 if (!m_ContentBrowserComponent)
37 m_wExtendedIcon =
GetWidget().FindAnyWidget(WIDGET_EXTENDED_ICON);
41 SCR_CompositionSlotManagerComponent slotManager = SCR_CompositionSlotManagerComponent.GetInstance();
43 slotManager.GetOnEntityChanged().Insert(OnEntityChanged);
46 m_wExtendedIcon.SetVisible(!slotManager.IsOccupied(owner) && m_ContentBrowserComponent.IsExtendedEntity(entity));
48 m_wExtendedIcon.SetVisible(
false);
54 void OnEntityChanged(SCR_CompositionSlotManagerComponent slotManager, IEntity slot)
56 if (!m_ContentBrowserComponent)
60 m_wExtendedIcon.SetVisible(!slotManager.IsOccupied(slot) && m_ContentBrowserComponent.IsExtendedEntity(
m_Entity));