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

◆ OnClick()

bool UIPropertyAttachment::OnClick ( Widget w,
int x,
int y,
int button )
inlineprivate

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

33 {
34 if ( w == m_WgtComboBox )
35 {
36 if ( m_PrevIndex != 0 )
37 {
38 EntityAI attachment = m_Obj.GetInventory().FindAttachment(m_SlotID);
39 GetGame().ObjectDelete(attachment);
40 }
41
42 int curr_index = m_WgtComboBox.GetCurrentItem();
43
44 if ( curr_index != 0 )
45 {
46 PluginDeveloper module_dev = PluginDeveloper.Cast( GetPlugin(PluginDeveloper) );
47
48 EntityAI e = module_dev.SpawnEntityAsAttachment(PluginSceneManager.PLAYER, m_Obj, m_ComboItems.Get(curr_index), 1, -1);
49 }
50
51 m_PrevIndex = curr_index;
52
53 return true;
54 }
55
56 return false;
57 }
class LogManager EntityAI
PluginBase GetPlugin(typename plugin_type)
Определения PluginManager.c:316
proto native void ObjectDelete(Object obj)
EntityAI m_Obj
Определения UIPropertyAttachment.c:9
int m_PrevIndex
Определения UIPropertyAttachment.c:8
ref TStringArray m_ComboItems
Определения UIPropertyAttachment.c:7
XComboBoxWidget m_WgtComboBox
Определения UIPropertyAttachment.c:5
proto native CGame GetGame()

Перекрестные ссылки GetGame(), GetPlugin(), m_ComboItems, m_Obj, m_PrevIndex, m_SlotID, m_WgtComboBox, CGame::ObjectDelete(), x и y.