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

◆ OnClick()

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

buttons clicks

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

356 {
357 if (w == m_ButtonStart)
358 {
360 return true;
361 }
362 else if (w == m_SetInitStateB)
363 {
364 int frameI = m_SetInitStateI.GetText().ToInt();
365
366 DayZPlayer player = DayZPlayer.Cast( GetGame().GetPlayer() );
367
368 HumanCommandWeapons hcw = player.GetCommandModifier_Weapons();
369 hcw.SetInitState(frameI);
370 }
371 else if (w == m_WeaponChange)
372 {
373 Print("Weapon Change pressed");
374
375 Dispatcher d = GetDispatcher();
376 if (d == null)
377 {
378 Print("No dispatcher - cannot get selected weapon");
379 return false;
380 }
381
383 if (p == null)
384 {
385 Print("No selected object");
386 return false;
387 }
388
389 Param1<string> p1 = Param1<string>.Cast(p);
390 Print(p1.param1);
391
392 m_CH_WeaponChangeI = p1.param1;
393 m_CH_WeaponChangeSlotH = m_WeaponSlotH.GetText().ToInt();
394 m_CH_WeaponChangeSlotS = m_WeaponSlotS.GetText().ToInt();
395 }
396 else if (w == m_WeaponHide)
397 {
399 m_CH_WeaponChangeSlotH = m_WeaponSlotH.GetText().ToInt();
400 m_CH_WeaponChangeSlotS = m_WeaponSlotS.GetText().ToInt();
401 }
402
403
404 return false;
405 }
Dispatcher GetDispatcher()
Определения Dispatcher.c:20
const CallID CALL_ID_SCR_CNSL_GETSELECTEDITEM
Определения Dispatcher.c:11
PlayerBase GetPlayer()
Определения ModifierBase.c:51
Param CallMethod(CallID call_id, Param params)
Определения Dispatcher.c:15
proto native void SetInitState(int pFrameIndex)
proto native CGame GetGame()
proto void Print(void var)
Prints content of variable to console/log.
void HumanCommandWeapons()
Определения human.c:1113

Перекрестные ссылки CALL_ID_SCR_CNSL_GETSELECTEDITEM, Dispatcher::CallMethod(), GetDispatcher(), GetGame(), GetPlayer(), m_ButtonStart, m_CH_WeaponChangeI, m_CH_WeaponChangeSlotH, m_CH_WeaponChangeSlotS, m_SetInitStateB, m_SetInitStateI, m_WeaponChange, m_WeaponHide, m_WeaponSlotH, m_WeaponSlotS, Print(), HumanCommandWeapons::SetInitState(), WeaponsStartAction(), x и y.