Dayz Explorer 1.28.160049
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
48 proto native float LocalValue();
49
50 proto native bool LocalPress();
51 proto native bool LocalRelease();
52 proto native bool LocalHold();
53 proto native bool LocalHoldBegin();
54 proto native bool LocalDoubleClick();
55 proto native bool LocalClick();
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 // take care when using these locking methods, if two or more systems un/lock the same input, there is a chance off cross-un/locking it from a wrong place! Use exclude groups instead.
77 proto native bool IsLocked(); // determine if locked (not active ATM)
78 proto native void Lock(); // lock (until unlock called or exclusion is selected)
79 proto native void Unlock(); // unlock exclusively
80
81 proto native int ConflictCount(); // get number of conflicts with other inputs
82
83 proto native void ForceEnable( bool bEnable ); // force enable on/ off
84 proto native void ForceDisable( bool bEnable ); // force disable on/ off
85
86 proto native void Backlit_Override( int eType, int iColor ); // enable/ disable backlit of associated controls (EUABACKLIT_*)
87 proto native bool Backlit_Enabled(); // check whether associated controls are backlit
88
89 proto native UAIDWrapper GetPersistentWrapper(); // create persistent object for input access
90
91 private void UAInput();
92 private void ~UAInput();
93};
94
95// -------------------------------------------------------------------------
97{
98 private void UAInterface() {}
99 private void ~UAInterface() {}
100
101 // getting action state
109 proto native float SyncedValue_ID(int action, bool check_focus = true);
110 proto native float SyncedValue(string action, bool check_focus = true);
111
119 proto native bool SyncedPress_ID(int action, bool check_focus = true);
120 proto native bool SyncedPress(string action, bool check_focus = true);
121
129 proto native bool SyncedRelease_ID(int action, bool check_focus = true);
130 proto native bool SyncedRelease(string action, bool check_focus = true);
131
139 proto native bool SyncedHold_ID(int action, bool check_focus = true);
140 proto native bool SyncedHold(string action, bool check_focus = true);
141
149 proto native bool SyncedDbl_ID(int action, bool check_focus = true);
150 proto native bool SyncedDbl(string action, bool check_focus = true);
151
159 proto native bool SyncedClick_ID(int action, bool check_focus = true);
160 proto native bool SyncedClick(string action, bool check_focus = true);
161
162};
163
164// -------------------------------------------------------------------------
166{
167 private void UAInputAPI() {}
168 private void ~UAInputAPI() {}
169
170 proto native void ListCurrentProfile();
171 proto native void ListCurrentPreset();
172 proto native void ListAvailableButtons();
173 proto native void ListActiveGroup();
174
175 proto native void GetActiveInputs( out TIntArray items );
176
177 proto native UAInput GetInputByID( int iID );
178 proto native UAInput GetInputByName( string sInputName );
179
180 proto native owned string GetButtonName( int iHash ); // get localized name for any button hash
181 proto native owned string GetButtonIcon( int iHash ); // get associated icon path for any button hash
182
183 proto native int ModificatorCount(); // modificator count
184 proto native owned string GetModificatorName( int index ); // modificator name
185
186 // for options only mapping, do not call normally as it is not performance wise!
187 proto native int DeterminePressedButton(); // recently pressed key, mouse button or pad button (returns zero if nothing pressed)
188 proto native int DeterminedCount(); // all buttons (keys, etc.) pressed during determination test (call only when DeterminePressedButton() returned something !)
189 proto native int GetDetermined( int iIndex ); // total count of pressed buttons (call only when DeterminePressedButton() returned something !)
190
191 proto native UAInput RegisterInput( string sInputName, string sLoc, string sGroupName );
192 proto native void DeRegisterInput( string sInputName );
193
194 proto native void RegisterGroup( string sGroupName, string sLoc );
195 proto native void DeRegisterGroup( string sGroupName );
196
197 proto native void UpdateControls(); // call this on each change of exclusion
198 proto native void ActivateGroup( string sGroupName );
199 proto native void ActivateExclude( string sExcludeName );
200 proto native void ActivateContext( string sContextName );
201 proto native void ActivateModificator( string sModName );
202 proto native void DeactivateModificator( string sModName );
203
204 proto native void DeactivateContext();
205
206 proto native bool PresetCreateNew(); // create new dynamic preset from the selected one. False == cannot create new == too many presets (current max == 6)
207 proto native bool PresetDelete( int index ); // delete specific preset - (false == not deletable!)
208 proto native int PresetCurrent(); // determine index of current preset - (-1 == not selected)
209 proto native void PresetSelect( int index ); // select specific preset
214 proto native void PresetReset();
215 proto native int PresetCount(); // count of presets
216 proto native owned string PresetName( int index ); // name of selected preset
217
218 proto native int SortingCount(); // sorting group count
219 proto native owned string SortingName( int index ); // sorting group name (different from localization!)
220 proto native owned string SortingLocalization( int index ); // sorting group localized name
221
222 proto native void Export(); // export XML (user) configuration
223 proto native void Revert(); // revert XML (user) configuration - all of it and use default PBO content! Auto-exports afterward.
224 proto native void SaveInputPresetMiscData(); // saves preset index on consoles, where the regular XMLs are unavailable
225 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)
226
227 proto native void Backlit_None(); // turn off backlit
228 proto native void Backlit_Background( int eType, int iColor1, int iColor2 ); // start backlit
229 proto native void Backlit_Animation( string strName, float fLifeTime, int iColor1, int iColor2 ); // start backlit animation and after time limit -> continue with another one
230 proto native bool Backlit_Enabled(); // check whether backlit active
231 proto native void Backlit_KeyByHash( int uHash, int eLayer, int eType, int iColor ); // key directly (during keybinding process) (EUABACKLIT_*)
232 proto native void Backlit_KeyByName( string strName, int eLayer, int eType, int iColor ); // key directly (by name) (EUABACKLIT_*)
233 proto native void Backlit_Remove( int eLayer ); // turn off layer of backlit
234 proto native void Backlit_ForceUpdate(); // this forces update immediately - USE ONLY IN LOADING SEQUENCE !!!
235 proto native void Backlit_EmptyQueue(); // empty queue of animations - use if you want to play something immediately
236
237};
238
239proto native UAInputAPI GetUApi();
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native UAInputAPI GetUApi()