DayZ 1.30
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ UpdateInterval()

override void AttachmentCategoriesContainer::UpdateInterval ( )
inlineprotected

См. определение в файле AttachmentCategoriesContainer.c строка 62

63 {
64 if (m_Entity)
65 {
66 int childrenCount = m_Body.Count();
67 int displayableChildrenCount = 0;
68
69 if (childrenCount > 0)
70 {
71 int i;
72 for (i = m_SlotsCount; i < childrenCount; ++i)
73 {
74 AttachmentCategoriesRow row = AttachmentCategoriesRow.Cast(m_Body[i]);
75 if (row)
76 {
78 {
79 if (row.IsDisplayable())
80 {
82 if (!row.IsVisible())
83 row.OnShow();
84 }
85 else
86 {
88 if (row.IsVisible())
89 row.OnHide();
90 }
91 }
92 else
93 {
95 if (row.IsVisible())
96 row.OnHide();
97 }
98 row.UpdateInterval();
99 }
100 else
101 {
102 ContainerWithCargo cargo = ContainerWithCargo.Cast(m_Body[i]);
103 if (cargo)
104 {
106 {
107 m_CargoSlotsIcon.m_MainWidget.Show(true);
108 if (!cargo.IsVisible())
109 cargo.OnShow();
110 }
111 else
112 {
113 m_CargoSlotsIcon.m_MainWidget.Show(false);
114 if (cargo.IsVisible())
115 cargo.OnHide();
116 }
117 cargo.UpdateInterval();
118 }
119 RecomputeOpenedContainers();
120 }
121
122 }
123
124 //finally update slot category icons
125 for (i = 0; i < m_SlotsCount; ++i)
126 {
127 AttachmentCategoriesSlotsContainer slotsContainer = AttachmentCategoriesSlotsContainer.Cast(m_Body[i]);
128 if (slotsContainer.IsDisplayable())
129 {
130 if (!m_Hidden)
131 slotsContainer.OnShow();
132 else
133 slotsContainer.OnHide();
134
135 displayableChildrenCount++; //slot category icons should always count as 'there', regardless of visibility due to closed state of the parent container
136 }
137 else
138 {
139 slotsContainer.OnHide();
140 }
141 }
142 }
143
144 bool show = displayableChildrenCount > 0 && !m_Entity.GetInventory().IsInventoryLockedForLockType(HIDE_INV_FROM_SCRIPT);
145 if (!m_CollapsibleHeader.IsVisible() && show)
146 {
147 m_CollapsibleHeader.OnShow();
148 }
149 else if (m_CollapsibleHeader.IsVisible() && !show)
150 {
151 m_CollapsibleHeader.OnHide();
152 HideContent();
153 }
154
155 GetMainWidget().Show(show);
156 }
157 }
Entity m_Entity
Определения CachedEquipmentStorageBase.c:16
void ShowInSlots(string category, bool show)
override void UpdateInterval()
Определения AttachmentCategoriesRow.c:987
string GetCategoryIdentifier()
Определения AttachmentCategoriesRow.c:23
override bool IsDisplayable()
Определения ContainerWithCargo.c:19
bool m_Hidden
Определения CollapsibleContainer.c:4
ref CollapsibleHeader m_CollapsibleHeader
Определения CollapsibleContainer.c:3
override void OnShow()
Определения ClosableContainer.c:93
proto native GameInventory GetInventory()
bool CanDisplayAttachmentCategory(string category_name)
bool CanDisplayCargo()
proto native bool IsInventoryLockedForLockType(int lockType)

Перекрестные ссылки AttachmentCategoriesRow::GetCategoryIdentifier(), AttachmentCategoriesSlotsContainer::IsDisplayable(), ClosableContainer::IsDisplayable(), m_CargoSlotsIcon, CollapsibleContainer::m_CollapsibleHeader, m_Entity, CollapsibleContainer::m_Hidden, m_SlotsCount, Container::OnShow(), ShowInSlots() и AttachmentCategoriesRow::UpdateInterval().