DayZ 1.24
Loading...
Searching...
No Matches
PluginDayzPlayerDebug_Ctrl Class Reference
Collaboration diagram for PluginDayzPlayerDebug_Ctrl:
[legend]

Private Member Functions

void PluginDayzPlayerDebug_Ctrl (Widget pMainWnd)
 
void ~PluginDayzPlayerDebug_Ctrl ()
 
void CreateModuleWidgets ()
 
void DestroyModuleWidgets ()
 
bool OnClick (Widget w, int x, int y, int button)
 buttons clicks
 
bool OnChange (Widget w, int x, int y, bool finished)
 
void CommandHandler ()
 

Private Attributes

Widget m_MainWnd
 
XComboBoxWidget m_ForceStance
 
EditBoxWidget m_MovSpeedEB
 
EditBoxWidget m_MovDirEB
 
CheckBoxWidget m_MovOverrideCheckbox
 
int m_ApplyStanceChange
 
bool m_OverrideMovementChange = false
 

Detailed Description

Definition at line 6 of file PluginDayzPlayerDebug_Ctrl.c.

Constructor & Destructor Documentation

◆ PluginDayzPlayerDebug_Ctrl()

void PluginDayzPlayerDebug_Ctrl::PluginDayzPlayerDebug_Ctrl ( Widget pMainWnd)
inlineprivate

◆ ~PluginDayzPlayerDebug_Ctrl()

void PluginDayzPlayerDebug_Ctrl::~PluginDayzPlayerDebug_Ctrl ( )
inlineprivate

Member Function Documentation

◆ CommandHandler()

void PluginDayzPlayerDebug_Ctrl::CommandHandler ( )
inlineprivate

Definition at line 106 of file PluginDayzPlayerDebug_Ctrl.c.

107 {
108 if (m_ApplyStanceChange != -2)
109 {
111 if (!player)
112 return;
113
114 HumanCommandMove cm = player.GetCommand_Move();
115 if (cm)
116 {
117 cm.ForceStance(m_ApplyStanceChange);
119 }
120 }
122 {
124
126 if (!player)
127 return;
128
129 float speed = m_MovSpeedEB.GetText().ToFloat();
130 float dir = m_MovDirEB.GetText().ToFloat();
131 player.GetInputController().OverrideMovementSpeed(m_MovOverrideCheckbox.IsChecked(), speed);
132 player.GetInputController().OverrideMovementAngle(m_MovOverrideCheckbox.IsChecked(), dir);
133 }
134 }
PlayerBase GetPlayer()
proto native CGame GetGame()

References GetGame(), GetPlayer(), m_ApplyStanceChange, m_MovDirEB, m_MovOverrideCheckbox, m_MovSpeedEB, and m_OverrideMovementChange.

◆ CreateModuleWidgets()

void PluginDayzPlayerDebug_Ctrl::CreateModuleWidgets ( )
inlineprivate

Definition at line 38 of file PluginDayzPlayerDebug_Ctrl.c.

39 {
40 m_ForceStance = XComboBoxWidget.Cast(m_MainWnd.FindAnyWidget("StanceV"));
41 m_MovSpeedEB = EditBoxWidget.Cast(m_MainWnd.FindAnyWidget("MovSpeedEB"));
42 m_MovDirEB = EditBoxWidget.Cast(m_MainWnd.FindAnyWidget("MovDirEB"));
43 m_MovOverrideCheckbox = CheckBoxWidget.Cast(m_MainWnd.FindAnyWidget("OverrideMovCheckBox"));
44 }

References m_ForceStance, m_MainWnd, m_MovDirEB, m_MovOverrideCheckbox, and m_MovSpeedEB.

Referenced by PluginDayzPlayerDebug_Ctrl().

◆ DestroyModuleWidgets()

void PluginDayzPlayerDebug_Ctrl::DestroyModuleWidgets ( )
inlineprivate

Definition at line 46 of file PluginDayzPlayerDebug_Ctrl.c.

47 {
48 }

Referenced by ~PluginDayzPlayerDebug_Ctrl().

◆ OnChange()

bool PluginDayzPlayerDebug_Ctrl::OnChange ( Widget w,
int x,
int y,
bool finished )
inlineprivate

Definition at line 91 of file PluginDayzPlayerDebug_Ctrl.c.

92 {
93 if (w == m_MovSpeedEB || w == m_MovDirEB)
94 {
95 Print("Movement override");
97 return true;
98 }
99
100 return false;
101 }
proto void Print(void var)
Prints content of variable to console/log.

References m_MovDirEB, m_MovSpeedEB, m_OverrideMovementChange, and Print().

◆ OnClick()

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

buttons clicks

Definition at line 73 of file PluginDayzPlayerDebug_Ctrl.c.

74 {
75 if (w == m_ForceStance)
76 {
77 Print("Stance changed");
78 m_ApplyStanceChange = m_ForceStance.GetCurrentItem() - 1;
79 return true;
80 }
81 else if (w == m_MovOverrideCheckbox)
82 {
83 Print("Movement override");
85 }
86
87
88 return false;
89 }

References m_ApplyStanceChange, m_ForceStance, m_MovOverrideCheckbox, m_OverrideMovementChange, and Print().

Member Data Documentation

◆ m_ApplyStanceChange

int PluginDayzPlayerDebug_Ctrl::m_ApplyStanceChange
private

◆ m_ForceStance

XComboBoxWidget PluginDayzPlayerDebug_Ctrl::m_ForceStance
private

Definition at line 10 of file PluginDayzPlayerDebug_Ctrl.c.

Referenced by CreateModuleWidgets(), and OnClick().

◆ m_MainWnd

Widget PluginDayzPlayerDebug_Ctrl::m_MainWnd
private

Definition at line 8 of file PluginDayzPlayerDebug_Ctrl.c.

Referenced by CreateModuleWidgets(), and PluginDayzPlayerDebug_Ctrl().

◆ m_MovDirEB

EditBoxWidget PluginDayzPlayerDebug_Ctrl::m_MovDirEB
private

Definition at line 12 of file PluginDayzPlayerDebug_Ctrl.c.

Referenced by CommandHandler(), CreateModuleWidgets(), and OnChange().

◆ m_MovOverrideCheckbox

CheckBoxWidget PluginDayzPlayerDebug_Ctrl::m_MovOverrideCheckbox
private

Definition at line 13 of file PluginDayzPlayerDebug_Ctrl.c.

Referenced by CommandHandler(), CreateModuleWidgets(), and OnClick().

◆ m_MovSpeedEB

EditBoxWidget PluginDayzPlayerDebug_Ctrl::m_MovSpeedEB
private

Definition at line 11 of file PluginDayzPlayerDebug_Ctrl.c.

Referenced by CommandHandler(), CreateModuleWidgets(), and OnChange().

◆ m_OverrideMovementChange

bool PluginDayzPlayerDebug_Ctrl::m_OverrideMovementChange = false
private

Definition at line 17 of file PluginDayzPlayerDebug_Ctrl.c.

Referenced by CommandHandler(), OnChange(), and OnClick().


The documentation for this class was generated from the following file: