DayZ 1.24
Loading...
Searching...
No Matches
array Class Reference

Result for an object found in CGame.IsBoxCollidingGeometryProxy. More...

Collaboration diagram for array:
[legend]

Protected Member Functions

void KeybindingsContainer (int index, Input input, Widget parent, KeybindingsMenu menu)
 
string GetLayoutName ()
 
void OnSelectKBPreset (int index)
 
void ReloadElements ()
 
void AddSubgroup (int sort_index, Widget parent, Input input)
 
void CreateSubgroups (Widget parent, Input input)
 
void AddElement (int index, Widget parent, Input input)
 
bool IsEnteringKeyBind ()
 
void ClearKeybind (int key_index)
 
void ClearAlternativeKeybind (int key_index)
 
void StartEnteringKeybind (int key_index)
 
void CancelEnteringKeybind ()
 
void StartEnteringAlternateKeybind (int key_index)
 
void CancelEnteringAlternateKeybind ()
 
bool IsChanged ()
 is anything changed?
 
void Apply ()
 
void Reset (bool forced=false)
 
void Update (float timeslice)
 
void SwitchSubgroup (int index)
 

Protected Attributes

const int NO_SORTING = -1
 
Widget m_Root
 
KeybindingsMenu m_Menu
 
ScrollWidget m_Scroll
 
ref map< int, ref ElementArraym_KeyWidgetElements
 
int m_CurrentSettingKeyIndex = -1
 
int m_CurrentSettingAlternateKeyIndex = -1
 
ref array< Widgetm_Subgroups
 

Private Member Functions

void ParticleProperties (vector localPos, int flags, Object parent=null, vector localOri=vector.Zero, Class owner=null)
 Constructor (ctor)
 
void ~ParticleProperties ()
 dtor
 
void TFCaller (Class instance, string test, TFResult result)
 
TFResult Run (float dt)
 
string GetTest ()
 
string GetTestEx ()
 
Data access

Methods to retrieve the data in script

proto Object GetParent ()
 
proto Class GetOwner ()
 
proto vector GetLocalPos ()
 
proto vector GetLocalOri ()
 
proto int GetPPFlags ()
 
proto bool IsPlayOnCreation ()
 
proto bool IsForceWorldRotation ()
 
proto bool IsKeepParentOnEnd ()
 

Private Attributes

Object obj
 Object inside of box.
 
Object parent
 Parent of proxy object.
 
int hierLevel
 How deep in the proxy hierarchy are we.
 
int geomLevel
 What geometry was the object found in (will either be primaryType or secondaryType)
 
ref ComponentInfoArray componentInfo
 Either the first component found or all of them depending on "fullComponentInfo".
 
ref ProxyInfoArray proxyInfo
 Either the first proxy found or all of them depending on "fullComponentInfo".
 
Class m_Instance
 
string m_Test
 
ref TFResult m_Result
 

Detailed Description

Result for an object found in CGame.IsBoxCollidingGeometryProxy.

Properties while creating a ParticleSource.

Definition at line 27 of file IsBoxCollidingGeometryProxyClasses.c.

Constructor & Destructor Documentation

◆ ~ParticleProperties()

void array::~ParticleProperties ( )
inlineprivate

dtor

Definition at line 83 of file ParticleSource.c.

84 {
85 }

Member Function Documentation

◆ AddElement()

void array::AddElement ( int index,
Widget parent,
Input input )
inlineprotected

Definition at line 88 of file KeybindingsContainer.c.

89 {
90 //create array if needed
91 if (!m_KeyWidgetElements.Get(index))
92 {
95 }
96
97 KeybindingElementNew element = new KeybindingElementNew(index, parent, this);
99 }
Object parent
Parent of proxy object.
ref map< int, ref ElementArray > m_KeyWidgetElements

References ScriptedWidgetEventHandler::KeybindingElementNew().

◆ AddSubgroup()

void array::AddSubgroup ( int sort_index,
Widget parent,
Input input )
inlineprotected

Definition at line 53 of file KeybindingsContainer.c.

54 {
55 Widget subgroup = GetGame().GetWorkspace().CreateWidgets("gui/layouts/new_ui/options/keybindings_selectors/keybinding_subgroup.layout", parent);
56 Widget subgroup_content = subgroup.FindAnyWidget("subgroup_content");
57
61 else
63
64 for (int i = 0; i < input_actions.Count(); i++)
66
67 m_Subgroups.Insert(subgroup);
68
69 subgroup_content.Update();
70 }
static map< int, ref array< int > > GetInputActionSortingMap()
Definition InputUtils.c:203
static array< int > GetUnsortedInputActions()
Definition InputUtils.c:208
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
ref array< Widget > m_Subgroups
void AddElement(int index, Widget parent, Input input)
const int NO_SORTING
proto native CGame GetGame()

References ScriptedWidgetEventHandler::AddElement(), GetGame(), InputUtils::GetInputActionSortingMap(), and InputUtils::GetUnsortedInputActions().

◆ Apply()

void array::Apply ( )
inlineprotected

Definition at line 164 of file KeybindingsContainer.c.

165 {
167 int input_index = 0;
168
170 {
171 foreach (int element_index, KeybindingElementNew element : elements)
172 {
173 if (element_index == 0)
174 {
175 UAInput input = ua_api.GetInputByID(m_KeyWidgetElements.GetKey(input_index));
176 int i;
177 if (element.IsChanged())
178 {
179 array<int> new_keys = element.GetChangedBinds();
180 input.ClearDeviceBind(EUAINPUT_DEVICE_KEYBOARDMOUSE);
181 if (new_keys.Count() > 0)
182 {
183 input.BindComboByHash(new_keys.Get(0));
184 for (i = 1; i < new_keys.Count(); i++)
185 input.BindComboByHash(new_keys.Get(i));
186 }
187 }
188
189 if (element.IsAlternateChanged())
190 {
191 array<int> new_alt_keys = element.GetChangedAlternateBinds();
192
193 if (input.AlternativeCount() == 0)
194 input.AddAlternative();
195
196 input.ClearDeviceBind(EUAINPUT_DEVICE_CONTROLLER);
197
198 if (new_alt_keys.Count() > 0)
199 {
200 input.BindComboByHash(new_alt_keys.Get(0));
201 for (i = 1; i < new_alt_keys.Count(); i++)
202 input.BindComboByHash(new_alt_keys.Get(i));
203 }
204 }
205 }
206 element.Reload();
207 }
208 input_index++;
209 }
210 }
proto native UAInputAPI GetUApi()

References GetUApi().

◆ CancelEnteringAlternateKeybind()

void array::CancelEnteringAlternateKeybind ( )
inlineprotected

Definition at line 140 of file KeybindingsContainer.c.

141 {
143 {
144 foreach (KeybindingElementNew element : m_KeyWidgetElements.Get(m_CurrentSettingAlternateKeyIndex))
147 }
148 }
array< ref PlayerStatBase > Get()
void CancelEnteringKeybind()
int m_CurrentSettingAlternateKeyIndex

◆ CancelEnteringKeybind()

void array::CancelEnteringKeybind ( )
inlineprotected

Definition at line 123 of file KeybindingsContainer.c.

124 {
125 if (m_CurrentSettingKeyIndex != -1)
126 {
127 foreach (KeybindingElementNew element : m_KeyWidgetElements.Get(m_CurrentSettingKeyIndex))
130 }
131 }
int m_CurrentSettingKeyIndex

◆ ClearAlternativeKeybind()

void array::ClearAlternativeKeybind ( int key_index)
inlineprotected

Definition at line 111 of file KeybindingsContainer.c.

112 {
113 m_Menu.ClearAlternativeKeybind(key_index);
114 }
KeybindingsMenu m_Menu

References m_Menu.

◆ ClearKeybind()

void array::ClearKeybind ( int key_index)
inlineprotected

Definition at line 106 of file KeybindingsContainer.c.

107 {
108 m_Menu.ClearKeybind(key_index);
109 }

References m_Menu.

◆ CreateSubgroups()

void array::CreateSubgroups ( Widget parent,
Input input )
inlineprotected

Definition at line 72 of file KeybindingsContainer.c.

73 {
75
77 for (int i = 0; i < sort_count; i++)
78 {
79 if (InputUtils.GetInputActionSortingMap().GetElement(i) && InputUtils.GetInputActionSortingMap().GetElement(i).Count() > 0)
81 }
82
83 //any unssorted inputs go here
86 }
void AddSubgroup(int sort_index, Widget parent, Input input)

References ScriptedWidgetEventHandler::AddSubgroup(), InputUtils::GetInputActionSortingMap(), and InputUtils::GetUnsortedInputActions().

◆ GetLayoutName()

string array::GetLayoutName ( )
inlineprotected

Definition at line 31 of file KeybindingsContainer.c.

32 {
33 return "gui/layouts/new_ui/options/keybindings_selectors/keybinding_container.layout";
34 }

◆ GetLocalOri()

proto vector array::GetLocalOri ( )
private

◆ GetLocalPos()

proto vector array::GetLocalPos ( )
private

◆ GetOwner()

proto Class array::GetOwner ( )
private

◆ GetParent()

proto Object array::GetParent ( )
private

◆ GetPPFlags()

proto int array::GetPPFlags ( )
private

◆ GetTest()

string array::GetTest ( )
inlineprivate

Definition at line 70 of file TestFramework.c.

71 {
72 return m_Test;
73 }
string m_Test

◆ GetTestEx()

string array::GetTestEx ( )
inlineprivate

Definition at line 75 of file TestFramework.c.

76 {
77 return string.Format("%1::%2", m_Instance.ClassName(), m_Test);
78 }
Class m_Instance
proto native owned external string ClassName()
Returns name of class-type.

References string::Format(), and m_Instance.

◆ IsChanged()

bool array::IsChanged ( )
inlineprotected

is anything changed?

Definition at line 151 of file KeybindingsContainer.c.

152 {
154 {
155 foreach (KeybindingElementNew element : elements)
156 {
157 if (element.IsChanged() || element.IsAlternateChanged())
158 return true;
159 }
160 }
161 return false;
162 }

◆ IsEnteringKeyBind()

bool array::IsEnteringKeyBind ( )
inlineprotected

Definition at line 101 of file KeybindingsContainer.c.

102 {
104 }

◆ IsForceWorldRotation()

proto bool array::IsForceWorldRotation ( )
private

◆ IsKeepParentOnEnd()

proto bool array::IsKeepParentOnEnd ( )
private

◆ IsPlayOnCreation()

proto bool array::IsPlayOnCreation ( )
private

◆ KeybindingsContainer()

void array::KeybindingsContainer ( int index,
Input input,
Widget parent,
KeybindingsMenu menu )
inlineprotected

Definition at line 15 of file KeybindingsContainer.c.

16 {
18 m_Menu = menu;
19
20 m_Root = GetGame().GetWorkspace().CreateWidgets(GetLayoutName(), parent);
21 m_Scroll = ScrollWidget.Cast(m_Root.FindAnyWidget("group_scroll"));
22 Widget container = m_Root.FindAnyWidget("group_scroll");
23
25
26 container.Update();
27
28 m_Root.SetHandler(this);
29 }
ScrollWidget m_Scroll
void CreateSubgroups(Widget parent, Input input)
string GetLayoutName()

References GetGame(), ScriptedWidgetEventHandler::GetLayoutName(), m_Menu, and m_Root.

◆ OnSelectKBPreset()

void array::OnSelectKBPreset ( int index)
inlineprotected

Definition at line 36 of file KeybindingsContainer.c.

37 {
38 GetUApi().PresetSelect(index);
40 GetUApi().Export();
41 GetUApi().SaveInputPresetMiscData();
42 }
void ReloadElements()

References GetUApi().

◆ ParticleProperties()

void array::ParticleProperties ( vector localPos,
int flags,
Object parent = null,
vector localOri = vector.Zero,
Class owner = null )
inlineprivate

Constructor (ctor)

Parameters
localPosvector Local position of particle, if no parent this is world position
flagsint See ParticlePropertiesFlags
parentObject The parent that the ParticleSource will be added to as a child
localOrivector Local orientation of particle, if no parent this is world orientation
ownerClass The owning instance for this particle, as long as it exists, this particle will not be reused (unless flagged) Important when for example virtual is enabled since if the particle owner has been deleted, the virtual should not be converted Only fill in owner if necessary, for example when the owner is reusing the same particle after storing it

Definition at line 78 of file ParticleSource.c.

79 {
80 }

◆ ReloadElements()

void array::ReloadElements ( )
inlineprotected

Definition at line 44 of file KeybindingsContainer.c.

45 {
47 {
48 foreach (KeybindingElementNew element : elements)
49 element.Reload();
50 }
51 }

◆ Reset()

void array::Reset ( bool forced = false)
inlineprotected

Definition at line 212 of file KeybindingsContainer.c.

213 {
215 {
216 foreach (KeybindingElementNew element : elements)
217 {
218 if (element.IsChanged() || element.IsAlternateChanged() || forced)
219 element.Reload();
220 }
221 }
222 }

◆ Run()

TFResult array::Run ( float dt)
inlineprivate

Definition at line 58 of file TestFramework.c.

59 {
60 bool callResult = GetGame().GameScript.CallFunction(m_Instance, m_Test, m_Result, dt);
61 if (!callResult)
62 {
63 ErrorEx(string.Format("Failed to call function \'%1\' on \'%2\'", m_Test, m_Instance.GetDebugName()));
64 m_Result.Result = TFR.FAIL;
65 }
66
67 return m_Result;
68 }
TFR
ref TFResult m_Result
enum ShapeType ErrorEx
string GetDebugName()
Definition EnScript.c:39

References ErrorEx, GetGame(), and m_Instance.

◆ StartEnteringAlternateKeybind()

void array::StartEnteringAlternateKeybind ( int key_index)
inlineprotected

Definition at line 133 of file KeybindingsContainer.c.

134 {
137 m_Menu.StartEnteringAlternateKeybind(key_index);
138 }

References m_Menu.

◆ StartEnteringKeybind()

void array::StartEnteringKeybind ( int key_index)
inlineprotected

Definition at line 116 of file KeybindingsContainer.c.

117 {
120 m_Menu.StartEnteringKeybind(key_index);
121 }

References m_Menu.

◆ SwitchSubgroup()

void array::SwitchSubgroup ( int index)
inlineprotected

Definition at line 265 of file KeybindingsContainer.c.

266 {
267 Widget w;
268 for (int i = 0; i < m_Subgroups.Count(); i++)
269 {
270 w = m_Subgroups[i];
271 w.Show(index == i);
272 }
273
274 m_Scroll.VScrollToPos01(0);
275 }

◆ TFCaller()

void array::TFCaller ( Class instance,
string test,
TFResult result )
inlineprivate

Definition at line 51 of file TestFramework.c.

52 {
53 m_Instance = instance;
54 m_Test = test;
56 }

References m_Instance.

◆ Update()

void array::Update ( float timeslice)
inlineprotected

Definition at line 224 of file KeybindingsContainer.c.

225 {
227 {
229 if (ua_api.DeterminePressedButton() != 0)
230 {
231 string name;
232 string text;
234
235 // remove previous backlit
236 GetDayZGame().GetBacklit().KeybindingClear();
237
238 for (int i = 0; i < ua_api.DeterminedCount(); ++i)
239 {
240 int kb_id = ua_api.GetDetermined(i);
241 new_keybinds.Insert(kb_id);
242
243 // light up specific key
244 GetDayZGame().GetBacklit().KeybindingShow(kb_id);
245 }
246
247 if (m_CurrentSettingKeyIndex != -1)
248 {
249 m_Menu.ConfirmKeybindEntry(new_keybinds);
250 foreach (KeybindingElementNew element : m_KeyWidgetElements.Get(m_CurrentSettingKeyIndex))
251 element.Reload(new_keybinds, false);
253 }
255 {
256 m_Menu.ConfirmAlternateKeybindEntry(new_keybinds);
260 }
261 }
262 }
263 }
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
DayZGame GetDayZGame()
Definition DayZGame.c:3530

References GetDayZGame(), GetUApi(), m_Menu, and name.

Member Data Documentation

◆ componentInfo

ref ComponentInfoArray array::componentInfo
private

Either the first component found or all of them depending on "fullComponentInfo".

Definition at line 35 of file IsBoxCollidingGeometryProxyClasses.c.

◆ geomLevel

int array::geomLevel
private

What geometry was the object found in (will either be primaryType or secondaryType)

Definition at line 33 of file IsBoxCollidingGeometryProxyClasses.c.

◆ hierLevel

int array::hierLevel
private

How deep in the proxy hierarchy are we.

Definition at line 32 of file IsBoxCollidingGeometryProxyClasses.c.

◆ m_CurrentSettingAlternateKeyIndex

int array::m_CurrentSettingAlternateKeyIndex = -1
protected

Definition at line 11 of file KeybindingsContainer.c.

◆ m_CurrentSettingKeyIndex

int array::m_CurrentSettingKeyIndex = -1
protected

Definition at line 10 of file KeybindingsContainer.c.

◆ m_Instance

Class array::m_Instance
private

Definition at line 47 of file TestFramework.c.

◆ m_KeyWidgetElements

ref map<int, ref ElementArray> array::m_KeyWidgetElements
protected

Definition at line 9 of file KeybindingsContainer.c.

◆ m_Menu

KeybindingsMenu array::m_Menu
protected

Definition at line 6 of file KeybindingsContainer.c.

◆ m_Result

ref TFResult array::m_Result
private

Definition at line 49 of file TestFramework.c.

◆ m_Root

Widget array::m_Root
protected

Definition at line 5 of file KeybindingsContainer.c.

◆ m_Scroll

ScrollWidget array::m_Scroll
protected

Definition at line 7 of file KeybindingsContainer.c.

◆ m_Subgroups

ref array<Widget> array::m_Subgroups
protected

Definition at line 13 of file KeybindingsContainer.c.

◆ m_Test

string array::m_Test
private

Definition at line 48 of file TestFramework.c.

◆ NO_SORTING

const int array::NO_SORTING = -1
protected

Definition at line 4 of file KeybindingsContainer.c.

◆ obj

Object array::obj
private

Object inside of box.

Definition at line 29 of file IsBoxCollidingGeometryProxyClasses.c.

◆ parent

Object array::parent
private

Parent of proxy object.

Definition at line 30 of file IsBoxCollidingGeometryProxyClasses.c.

◆ proxyInfo

ref ProxyInfoArray array::proxyInfo
private

Either the first proxy found or all of them depending on "fullComponentInfo".

Definition at line 36 of file IsBoxCollidingGeometryProxyClasses.c.


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