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

◆ Show()

void UIPropertyAttachment::Show ( EntityAI e,
string slot_name,
TStringArray att_items )
inlineprivate

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

70 {
71 m_WgtThis.Show(true);
72
73 m_Obj = e;
74 m_ComboItems.Clear();
75 m_ComboItems.Insert("none");
76 m_ComboItems.InsertAll(att_items);
77
78 m_WgtSlotName.SetText(slot_name);
79
80 m_WgtComboBox.ClearAll();
81
82 m_SlotID = InventorySlots.GetSlotIdFromString(slot_name);
83 EntityAI attachment = e.GetInventory().FindAttachment(m_SlotID);
84 int selected_index = 0;
85
86 for ( int i = 0; i < m_ComboItems.Count(); ++i )
87 {
88 string item_name = m_ComboItems.Get(i);
89
90 m_WgtComboBox.AddItem(item_name);
91
92 if ( attachment != NULL && attachment.GetType() == item_name )
93 {
94 selected_index = i;
95 }
96 }
97
98 m_WgtComboBox.SetCurrentItem(selected_index);
99 m_PrevIndex = selected_index;
100 }
class LogManager EntityAI
EntityAI m_Obj
Определения UIPropertyAttachment.c:9
TextWidget m_WgtSlotName
Определения UIPropertyAttachment.c:6
int m_PrevIndex
Определения UIPropertyAttachment.c:8
ref TStringArray m_ComboItems
Определения UIPropertyAttachment.c:7
XComboBoxWidget m_WgtComboBox
Определения UIPropertyAttachment.c:5
Widget m_WgtThis
Определения UIPropertyAttachment.c:4

Перекрестные ссылки InventorySlots::GetSlotIdFromString(), m_ComboItems, m_Obj, m_PrevIndex, m_SlotID, m_WgtComboBox, m_WgtSlotName и m_WgtThis.

Используется в UIScriptedMenu::Refresh().