DayZ 1.24
Loading...
Searching...
No Matches
UAInput.c
Go to the documentation of this file.
1
5// constants for device (binding device) type determine:
6//
7// EUAINPUT_DEVICE_KEYBOARD
8// EUAINPUT_DEVICE_MOUSE
9// EUAINPUT_DEVICE_KEYBOARDMOUSE
10// EUAINPUT_DEVICE_CONTROLLER
11// EUAINPUT_DEVICE_IR
12
13// -------------------------------------------------------------------------
15{
16 private void UAIDWrapper() {}
17 private void ~UAIDWrapper() {}
18
19 proto native UAInput InputP(); // get input pointer
20};
21
22// -------------------------------------------------------------------------
24{
25 proto native int ID(); // return input index
26 proto native int NameHash(); // return input hash
27
28 proto native int BindingCount(); // return binding count
29 proto native int Binding(int iIndex); // return binding at index
30
31 proto native void ClearBinding(); // remove all bindings
32
33 proto native void BindCombo(string sButtonName); // bind combo to this input by name (single/ or append to existing button)
34 proto native void BindComboByHash(int iHash); // bind combo to this input by hash (single/ or append to existing button)
35
36 proto native void AddAlternative(); // add new alternative keybind
37 proto native void ClearAlternative(int iIndex); // clear binding alternative by index
38 proto native void SelectAlternative(int iIndex); // select binding alternative by index
39 proto native int AlternativeCount(); // get currently assigned alternative count
40 proto native int AlternativeIndex(); // get currently selected alternative index
41 proto native void ClearDeviceBind(int iDeviceFlags); // clear binding for specific device(s)
42
43 proto native int BindKeyCount(); // binded key count (for selected alternative)
44 proto native int GetBindKey(int iIndex); // binded "control" at index (for selected alternative)
45 proto native int GetBindDevice(int iIndex); // binded "control" device type at index (for selected alternative)
46 proto native bool CheckBindDevice(int iIndex, int iDeviceFlags); // compare binded device "control" type :: EUAINPUT_DEVICE_KEYBOARD for example
47
49
56
57 proto native bool IsCombo(); // return true if there is currently combo bind - use Binding() result !!!
58
59 // normal state is there are no limits, input generates all the events
60 // but if there is an limiter,
61 proto native bool IsLimited(); // return true if there is an event limit
62
63 proto native bool IsLimitConditionActive(); // return true if event limits matches current control item activity
64
65 proto native bool IsPressLimit(); // if limited to PRESS
66 proto native bool IsReleaseLimit(); // if limited to RELEASE
67 proto native bool IsHoldLimit(); // if limited to HOLD
68 proto native bool IsHoldBeginLimit(); // if limited to HOLDBEGIN
69 proto native bool IsClickLimit(); // if limited to SINGLE CLICK
70 proto native bool IsDoubleClickLimit(); // if limited to DOUBLE CLICK
71
72 proto native bool HasSorting(int iIndex); // has sorting group index?
73
74 proto native void Supress(); // supress press event for next frame (while not pressed ATM - otherwise until release)
75
76 proto native bool IsLocked(); // determine if locked (not active ATM)
77 proto native void Lock(); // lock (until unlock called or exclusion is selected)
78 proto native void Unlock(); // unlock exclusively
79
80 proto native int ConflictCount(); // get number of conflicts with other inputs
81
82 proto native void ForceEnable(bool bEnable); // force enable on/ off
83 proto native void ForceDisable(bool bEnable); // force disable on/ off
84
85 proto native void Backlit_Override(int eType, int iColor); // enable/ disable backlit of associated controls (EUABACKLIT_*)
86 proto native bool Backlit_Enabled(); // check whether associated controls are backlit
87
88 proto native UAIDWrapper GetPersistentWrapper(); // create persistent object for input access
89
90 private void UAInput();
91 private void ~UAInput();
92};
93
94// -------------------------------------------------------------------------
96{
97 private void UAInterface() {}
98 private void ~UAInterface() {}
99
100 // getting action state
109 proto native float SyncedValue(string action, bool check_focus = true);
110
119 proto native bool SyncedPress(string action, bool check_focus = true);
120
129 proto native bool SyncedRelease(string action, bool check_focus = true);
130
139 proto native bool SyncedHold(string action, bool check_focus = true);
140
149 proto native bool SyncedDbl(string action, bool check_focus = true);
150
159 proto native bool SyncedClick(string action, bool check_focus = true);
160
161};
162
163// -------------------------------------------------------------------------
165{
166 private void UAInputAPI() {}
167 private void ~UAInputAPI() {}
168
173
175
178
179 proto native owned string GetButtonName(int iHash); // get localized name for any button hash
180 proto native owned string GetButtonIcon(int iHash); // get associated icon path for any button hash
181
182 proto native int ModificatorCount(); // modificator count
183 proto native owned string GetModificatorName(int index); // modificator name
184
185 // for options only mapping, do not call normally as it is not performance wise!
186 proto native int DeterminePressedButton(); // recently pressed key, mouse button or pad button (returns zero if nothing pressed)
187 proto native int DeterminedCount(); // all buttons (keys, etc.) pressed during determination test (call only when DeterminePressedButton() returned something !)
188 proto native int GetDetermined(int iIndex); // total count of pressed buttons (call only when DeterminePressedButton() returned something !)
189
192
195
196 proto native void UpdateControls(); // call this on each change of exclusion
202
204
205 proto native bool PresetCreateNew(); // create new dynamic preset from the selected one. False == cannot create new == too many presets (current max == 6)
206 proto native bool PresetDelete(int index); // delete specific preset - (false == not deletable!)
207 proto native int PresetCurrent(); // determine index of current preset - (-1 == not selected)
208 proto native void PresetSelect(int index); // select specific preset
214 proto native int PresetCount(); // count of presets
215 proto native owned string PresetName(int index); // name of selected preset
216
217 proto native int SortingCount(); // sorting group count
218 proto native owned string SortingName(int index); // sorting group name (different from localization!)
219 proto native owned string SortingLocalization(int index); // sorting group localized name
220
221 proto native void Export(); // export XML (user) configuration
222 proto native void Revert(); // revert XML (user) configuration - all of it and use default PBO content! Auto-exports afterward.
223 proto native void SaveInputPresetMiscData(); // saves preset index on consoles, where the regular XMLs are unavailable
224 proto native void SupressNextFrame(bool bForce); // supress inputs for nextframe (until key release - call this when leaving main menu and alike - to avoid button collision after character control returned)
225
226 proto native void Backlit_None(); // turn off backlit
227 proto native void Backlit_Background(int eType, int iColor1, int iColor2); // start backlit
228 proto native void Backlit_Animation(string strName, float fLifeTime, int iColor1, int iColor2); // start backlit animation and after time limit -> continue with another one
229 proto native bool Backlit_Enabled(); // check whether backlit active
230 proto native void Backlit_KeyByHash(int uHash, int eLayer, int eType, int iColor); // key directly (during keybinding process) (EUABACKLIT_*)
231 proto native void Backlit_KeyByName(string strName, int eLayer, int eType, int iColor); // key directly (by name) (EUABACKLIT_*)
232 proto native void Backlit_Remove(int eLayer); // turn off layer of backlit
233 proto native void Backlit_ForceUpdate(); // this forces update immediately - USE ONLY IN LOADING SEQUENCE !!!
234 proto native void Backlit_EmptyQueue(); // empty queue of animations - use if you want to play something immediately
235
236};
237
proto native UAInputAPI GetUApi()
proto native UAInput InputP()
void UAIDWrapper()
Definition UAInput.c:16
void ~UAIDWrapper()
Definition UAInput.c:17
proto native owned string SortingLocalization(int index)
proto native bool PresetCreateNew()
proto native int GetDetermined(int iIndex)
proto native void UpdateControls()
proto native void ActivateExclude(string sExcludeName)
proto native bool Backlit_Enabled()
proto native void Backlit_Animation(string strName, float fLifeTime, int iColor1, int iColor2)
proto native void Backlit_Remove(int eLayer)
proto native void Backlit_EmptyQueue()
proto native void DeactivateContext()
proto native UAInput GetInputByID(int iID)
returns list of all bindable (i.e. visible) inputs from the active group ('core' by default)
proto native void Backlit_Background(int eType, int iColor1, int iColor2)
proto native UAInput GetInputByName(string sInputName)
proto native owned string GetModificatorName(int index)
proto native void SaveInputPresetMiscData()
proto native void Backlit_None()
proto native owned string PresetName(int index)
proto native void SupressNextFrame(bool bForce)
proto native UAInput RegisterInput(string sInputName, string sLoc, string sGroupName)
proto native void ActivateModificator(string sModName)
proto native void DeRegisterGroup(string sGroupName)
proto native void ListActiveGroup()
proto native void ActivateContext(string sContextName)
void ~UAInputAPI()
Definition UAInput.c:167
proto native owned string GetButtonName(int iHash)
proto native int PresetCurrent()
proto native int SortingCount()
proto native void PresetSelect(int index)
proto native void RegisterGroup(string sGroupName, string sLoc)
proto native int PresetCount()
proto native void Backlit_ForceUpdate()
proto native void ListCurrentPreset()
proto native void Export()
proto native void Backlit_KeyByHash(int uHash, int eLayer, int eType, int iColor)
proto native int DeterminePressedButton()
proto native void GetActiveInputs(out TIntArray items)
proto native int ModificatorCount()
proto native void Revert()
proto native bool PresetDelete(int index)
proto native owned string GetButtonIcon(int iHash)
void UAInputAPI()
Definition UAInput.c:166
proto native void DeRegisterInput(string sInputName)
proto native void PresetReset()
Resets current 'main' preset without reverting anything else ('softer' Revert)
proto native void ActivateGroup(string sGroupName)
proto native owned string SortingName(int index)
proto native void ListAvailableButtons()
proto native void ListCurrentProfile()
proto native void Backlit_KeyByName(string strName, int eLayer, int eType, int iColor)
proto native void DeactivateModificator(string sModName)
proto native int DeterminedCount()
proto native bool LocalRelease()
proto native bool LocalHold()
proto native bool Backlit_Enabled()
proto native void Supress()
proto native void ForceEnable(bool bEnable)
proto native bool IsLimitConditionActive()
proto native bool IsHoldLimit()
proto native int Binding(int iIndex)
proto native bool LocalDoubleClick()
proto native void ClearBinding()
proto native void Backlit_Override(int eType, int iColor)
proto native bool IsClickLimit()
proto native int NameHash()
proto native UAIDWrapper GetPersistentWrapper()
proto native void ForceDisable(bool bEnable)
void ~UAInput()
proto native int AlternativeIndex()
proto native int BindingCount()
proto native bool LocalHoldBegin()
proto native void AddAlternative()
proto native void Unlock()
proto native int BindKeyCount()
proto native int AlternativeCount()
proto native void SelectAlternative(int iIndex)
proto native int ID()
proto native int GetBindKey(int iIndex)
proto native float LocalValue()
proto native void ClearAlternative(int iIndex)
proto native bool IsReleaseLimit()
proto native bool IsCombo()
proto native bool IsHoldBeginLimit()
proto native void BindCombo(string sButtonName)
proto native void ClearDeviceBind(int iDeviceFlags)
proto native void BindComboByHash(int iHash)
proto native int GetBindDevice(int iIndex)
proto native bool IsLocked()
proto native int ConflictCount()
proto native bool LocalClick()
proto native bool IsPressLimit()
proto native bool HasSorting(int iIndex)
void UAInput()
proto native void Lock()
proto native bool IsLimited()
proto native bool IsDoubleClickLimit()
proto native bool CheckBindDevice(int iIndex, int iDeviceFlags)
proto native bool LocalPress()
proto native float SyncedValue(string action, bool check_focus=true)
proto native bool SyncedDbl(string action, bool check_focus=true)
proto native bool SyncedRelease(string action, bool check_focus=true)
proto native bool SyncedClick(string action, bool check_focus=true)
proto native bool SyncedHold(string action, bool check_focus=true)
proto native bool SyncedRelease_ID(int action, bool check_focus=true)
Returns true just in frame, when release action happened (button was released)
proto native bool SyncedPress_ID(int action, bool check_focus=true)
Returns true just in frame, when action was invoked (button was pressed)
proto native bool SyncedDbl_ID(int action, bool check_focus=true)
Returns true just in frame, when double click action invoked (button double clicked)
proto native bool SyncedPress(string action, bool check_focus=true)
proto native bool SyncedClick_ID(int action, bool check_focus=true)
Returns true just in frame, when single click action invoked (button pressed and released before hold...
void UAInterface()
Definition UAInput.c:97
void ~UAInterface()
Definition UAInput.c:98
proto native float SyncedValue_ID(int action, bool check_focus=true)
Get action state.
proto native bool SyncedHold_ID(int action, bool check_focus=true)
Returns true just in frame, when hold action invoked (button is hold)
Result for an object found in CGame.IsBoxCollidingGeometryProxy.