3 [
Attribute(
"IconEmpty",
desc:
"Icon used when the entity does not have any child entities.")]
4 protected string m_sEmptyIconWidgetName;
6 [
Attribute(
"IconLayer",
desc:
"Icon used when the entity is a layer, e.g., has some children.\nMUST BE HIDDEN BY DEFAULT!")]
7 protected string m_sLayerIconWidgetName;
9 protected bool m_bIsCustom;
20 Widget emptyIconWidget =
GetWidget().FindAnyWidget(m_sEmptyIconWidgetName);
22 emptyIconWidget.SetVisible(!isLayer);
24 Widget layerIconWidget =
GetWidget().FindAnyWidget(m_sLayerIconWidgetName);
26 layerIconWidget.SetVisible(isLayer);
36 ImageWidget emptyIconWidget = ImageWidget.Cast(
GetWidget().FindAnyWidget(m_sEmptyIconWidgetName));
37 m_bIsCustom = info.SetIconTo(emptyIconWidget);
41 if (!m_bIsCustom && entity)
44 core.Event_OnParentEntityChanged.Insert(OnParentEntityChanged);
46 OnParentEntityChanged(
null, entity,
null);
51 override void HandlerDeattached(Widget w)
53 super.HandlerDeattached(w);
59 core.Event_OnParentEntityChanged.Remove(OnParentEntityChanged);