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

◆ InitIconsContainers()

void AttachmentCategoriesContainer::InitIconsContainers ( )
inlineprotected

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

288 {
289 m_SlotsCount = 0;
290
291 string type = m_Entity.GetType();
292 string config_path_attachment_categories = "CfgVehicles " + type + " GUIInventoryAttachmentsProps";
293 int attachments_categories_count = GetAttachmentCategoriesCount( config_path_attachment_categories );
294 int categories_count = attachments_categories_count;
295 if (m_Entity.GetInventory().GetCargo())
296 {
297 categories_count++;
298 }
299 int row_count = categories_count / ITEMS_IN_ROW;
300 if (categories_count % ITEMS_IN_ROW != 0)
301 {
302 row_count++;
303 }
304 for ( int i = 0; i < row_count; i++ )
305 {
306 ref AttachmentCategoriesSlotsContainer items_cont = new AttachmentCategoriesSlotsContainer( this, i );
307 m_Body.Insert( items_cont );
308 m_OpenedContainers.Insert( items_cont );
309
310 //TODO MW find better way
311 if (i == ( row_count - 1 ) && categories_count % ITEMS_IN_ROW != 0)
312 items_cont.GetSlotsContainer().SetColumnCount( categories_count % ITEMS_IN_ROW );
313 else
314 items_cont.GetSlotsContainer().SetColumnCount( ITEMS_IN_ROW );
315 }
316 m_SlotsCount = row_count;
317 }
const int ITEMS_IN_ROW
Определения Attachments.c:1
EntityAI m_Entity
Определения ActionDebug.c:11
int GetAttachmentCategoriesCount(string config_path)

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

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