DayZ 1.30
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
ActionInfoPanels.c
См. документацию.
1
4
5class TargetActionInfoPanelBase: ActionInfoPanelBase
6{
7 protected int m_VisibleGridCount;
11
12 void Init()
13 {
15 }
16
17 protected void InitGridStructure()
18 {
20 }
21
24 {
25 m_ActionInfo = info;
26 }
27
29 override void SetLayoutName()
30 {
31 m_LayoutName = "Gui/layouts/new_ui/hud/action_info_spacer.layout";
32 }
33
35 {
37 }
38
40 {
41 m_ActionInfo = info;
42 m_Target = target;
44 }
45
46 override void UpdateInterval()
47 {
49 foreach (ActionInfoGridBase grid : m_GridsArray)
50 {
51 grid.SetInfoData(m_ActionInfo, m_Target);
52 grid.UpdateInterval();
53 m_VisibleGridCount += grid.IsVisible();
54 }
55
56 bool show = m_VisibleGridCount > 0;
57 if (!m_RootWidget.IsVisibleHierarchy() && show)
58 OnShow();
59 if (m_RootWidget.IsVisibleHierarchy() && !show)
61
62 //Print(this);
63 //Print(m_VisibleGridCount);
64 }
65
68 {
69 Cleanup();
70 OnHide();
71 }
72
73 protected void Cleanup()
74 {
75 foreach (ActionInfoGridBase grid : m_GridsArray)
76 {
77 grid.Cleanup();
78 }
79 }
80}
81
82class ConstructionActionInfoPanel: TargetActionInfoPanelBase
83{
85
89
90 override protected void InitGridStructure()
91 {
92 super.InitGridStructure();
93
94 m_GridsArray.Insert(new ConstructionActionInfoToolsGrid(this, m_RootWidget.FindAnyWidget("SecondaryGrid0")));
95 m_GridsArray.Insert(new ConstructionActionInfoMaterialsGrid(this, m_RootWidget.FindAnyWidget("SecondaryGrid1")));
96
97 m_Separator = m_RootWidget.FindAnyWidget("Separator");
98 }
99
100 override void UpdateInterval()
101 {
102 super.UpdateInterval();
103
104 //now handle the grid separator visibility
105 bool separatorVisible = m_Separator.IsVisible();
106 if ((m_VisibleGridCount > 1) != separatorVisible)
107 m_Separator.Show(!separatorVisible);
108 }
109}
ref ActionTarget m_Target
Определения ActionBase.c:18
override void UpdateInterval()
Определения ActionInfoGrids.c:256
override void SetParentWidget()
parent to the second subgrid
Определения ActionInfoGrids.c:285
void InitGridStructure()
Определения ActionInfoPanels.c:17
ActionInfoPanelBase m_VisibleGridCount
void SetActionInfo(ActionInfoDataBase info)
set to null when not in use
Определения ActionInfoPanels.c:23
ActionInfoDataBase m_ActionInfo
Определения ActionInfoPanels.c:8
void PerformPanelCleanup()
also hides!
Определения ActionInfoPanels.c:67
void UpdateTargetActionInfoPanel(ActionInfoDataBase info, ActionTarget target)
Определения ActionInfoPanels.c:39
ref array< ref ActionInfoGridBase > m_GridsArray
Определения ActionInfoPanels.c:10
override void SetLayoutName()
generic use not handled yet, if needed, just do something like hiding all children of 'MainGrid' widg...
Определения ActionInfoPanels.c:29
void ActionTarget(Object object, Object parent, int componentIndex, vector cursorHitPos, float utility, string surfaceName="")
Определения ActionTargets.c:125
static void Cleanup()
Определения AmmoTypes.c:134
override void OnShow()
Определения ControlsXbox.c:362
override Widget Init()
Определения DayZGame.c:127
override void OnHide()
Определения InventoryMenu.c:141
ref Widget m_RootWidget[MAX_SIMULTANIOUS_PLAYERS]
Определения PluginRemotePlayerDebugClient.c:14
Widget m_ParentWidget
Определения UiHintPanel.c:318
void ConstructionActionInfoPanel(LayoutHolder parent)
Определения ActionInfoPanels.c:86
void InitGridStructure()
Определения ActionInfoPanels.c:90
override void UpdateInterval()
Определения ActionInfoPanels.c:100
Widget m_Separator
Определения ActionInfoPanels.c:84
Определения Container.c:2
Определения EnWidgets.c:190
Result for an object found in CGame.IsBoxCollidingGeometryProxy.