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

◆ RecomputeOpenedContainers()

void LayoutHolder::RecomputeOpenedContainers ( )
inlineprotected

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

1149 {
1150 m_OpenedContainers.Clear();
1151 int i;
1152 bool need_reset_focus = false;
1153 Container c;
1154 for (i = 0; i < m_Body.Count(); i++)
1155 {
1156 c = Container.Cast(m_Body.Get( i ));
1157 if ( c )
1158 {
1159 c.RecomputeOpenedContainers();
1160 if (c.IsDisplayable() && c.IsVisible())
1161 {
1162 m_OpenedContainers.Insert(c);
1163 }
1164 else if (c.IsActive())
1165 {
1166 c.SetActive(false);
1167 need_reset_focus = true;
1168 }
1169
1170 }
1171 }
1172
1173 //In case of removing focused container or change order of containers
1174 if (IsActive())
1175 {
1176 if (!need_reset_focus && ( m_ActiveIndex >= m_OpenedContainers.Count() || !m_OpenedContainers[m_ActiveIndex].IsActive() ))
1177 {
1178 need_reset_focus = true;
1179 for (i = 0; i < m_OpenedContainers.Count(); i++)
1180 {
1182 {
1183 need_reset_focus = false;
1184 m_ActiveIndex = i;
1185 }
1186 }
1187 }
1188
1189 if (need_reset_focus)
1190 {
1192 }
1193 }
1194 }
bool IsActive()
Определения ModifierBase.c:130
override void SetActive(bool active)
Определения CargoContainer.c:769
override bool IsDisplayable()
Определения ClosableContainer.c:17
void Container(LayoutHolder parent)
Определения Container.c:35
ref array< ref LayoutHolder > m_Body
Определения Container.c:3
override void SetFirstActive()
Определения Container.c:823
ref array< LayoutHolder > m_OpenedContainers
Определения Container.c:4
int m_ActiveIndex
Определения Container.c:5

Перекрестные ссылки Container(), IsActive(), Container::IsDisplayable(), m_ActiveIndex, m_Body, m_OpenedContainers, Container::SetActive() и SetFirstActive().