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

◆ InitIconsContainers()

void AttachmentCategoriesContainer::InitIconsContainers ( )
inlineprotected

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

290 {
291 m_SlotsCount = 0;
292 TypeAttachmentGroupsDataHolder holder = m_Entity.GetTypeAttachmentGroupInfoHolder();
293 int categoriesCount = 0;
294 if (holder)
295 categoriesCount = holder.GetValidAttachmnetGroupCount();
296
298 {
299 categoriesCount++;
300 }
301 int rowCount = categoriesCount / ITEMS_IN_ROW;
302 if (categoriesCount % ITEMS_IN_ROW != 0)
303 {
304 rowCount++;
305 }
306 for (int i = 0; i < rowCount; ++i)
307 {
308 ref AttachmentCategoriesSlotsContainer itemsCont = new AttachmentCategoriesSlotsContainer(this, i);
309 m_Body.Insert(itemsCont);
310 m_OpenedContainers.Insert(itemsCont);
311
312 //TODO MW find better way
313 if (i == (rowCount - 1) && categoriesCount % ITEMS_IN_ROW != 0)
314 itemsCont.GetSlotsContainer().SetColumnCount(categoriesCount % ITEMS_IN_ROW);
315 else
316 itemsCont.GetSlotsContainer().SetColumnCount(ITEMS_IN_ROW);
317 }
318 m_SlotsCount = rowCount;
319 }
const int ITEMS_IN_ROW
Entity m_Entity
Определения CachedEquipmentStorageBase.c:16
proto native GameInventory GetInventory()
TypeAttachmentGroupsDataHolder GetTypeAttachmentGroupInfoHolder()
proto native CargoBase GetCargo()
cargo

Перекрестные ссылки TypeAttachmentGroupsDataHolder::GetValidAttachmnetGroupCount(), ITEMS_IN_ROW, m_Entity и m_SlotsCount.

Используется в SetEntity().