20 m_MainWidget = handledWidget;
25 Widget child = m_MainWidget.GetChildren();
29 child = child.GetSibling();
60 icon.ResetIconValues();
69 if (visible != shouldBe)
110 super.InitInfoGrid(parent,handledWidget);
131 ActionInfoDataConstructionBase info = ActionInfoDataConstructionBase.Cast(
m_ActionInfo);
135 int toolActionMask = EConstructionTools.TOOL_HANDS;
140 string toolCfgPath =
"cfgVehicles" +
" " + tool.GetType() +
" " +
"build_action_type";
141 if (
g_Game.ConfigIsExisting(toolCfgPath))
143 toolActionMask =
g_Game.ConfigGetInt(toolCfgPath);
147 toolActionMask = EConstructionTools.TOOL_NO_ACTION;
154 m_IconVisibleCount = 0;
156 bool firstValidToolSet =
false;
157 int maskOverlap = toolActionMask & partInfoMask;
167 toolIcon.SetConstructionPart(part);
168 iconIdx = toolIcon.GetIconIndex();
169 bool validToolBool = iconIdx & maskOverlap;
173 if (validToolBool && !firstValidToolSet)
178 firstValidToolSet =
true;
187 m_IconVisibleCount += toolIcon.IsVisible();
191 if (iconIdx == EConstructionTools.TOOL_HANDS)
203 m_IconVisibleCount += toolIcon.IsVisible();
214 m_IconVisibleCount = 0;
217 super.UpdateInterval();
236class ConstructionActionInfoMaterialsGrid: ConstructionActionInfoGrid
242 super.InitInfoGrid(parent,handledWidget);
253 m_Icons.Insert(
new ConstructionMaterialInfoIcon(
this,null,idx,null));
260 ActionInfoDataConstructionBase info = ActionInfoDataConstructionBase.Cast(
m_ActionInfo);
263 m_IconVisibleCount = 0;
264 ConstructionMaterialInfoIcon matIcon;
269 matIcon.SetConstructionPart(part);
272 matIcon.UpdateInterval();
273 m_IconVisibleCount += matIcon.IsVisible();
278 m_IconVisibleCount = 0;
281 super.UpdateInterval();
ref ActionTarget m_Target
void CreateNewIcon(int idx=-1)
override void UpdateInterval()
void InitInfoGrid(LayoutHolder parent, Widget handledWidget)
override void SetParentWidget()
parent to the second subgrid
ActionInfoGridBase m_LastPart
ConstructionActionInfoToolsGrid DEFAULT_MATERIAL_ICON_COUNT
ActionInfoDataBase m_ActionInfo
void ActionTarget(Object object, Object parent, int componentIndex, vector cursorHitPos, float utility, string surfaceName="")
EConstructionInfoCategories
ref Widget m_RootWidget[MAX_SIMULTANIOUS_PLAYERS]
override void SetLayoutName()
does not create unique layout, just a handler for an existing grid
ActionInfoDataBase m_ActionInfo
void CreateNewIcon(int idx=-1)
We CAN add more icons during runtime if needed..
ref array< ref GenericIconBase > m_Icons
void InitInfoGrid(LayoutHolder parent, Widget handledWidget)
override void SetParentWidget()
parent to the main grid
override void UpdateInterval()
void SetInfoData(ActionInfoDataBase info, ActionTarget target)
void ActionInfoGridBase(LayoutHolder parent, Widget handledWidget)
Super root of all classes in Enforce script.
int GetBuildIndicationTypeMask()
Instanced construction part data classes for dynamic data, statics now stored on EntityType level in ...
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.