Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
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 // -------------------------------------------------------------------------
23 class UAInput
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  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
108  proto native float SyncedValue_ID(int action, bool check_focus = true);
109  proto native float SyncedValue(string action, bool check_focus = true);
110 
118  proto native bool SyncedPress_ID(int action, bool check_focus = true);
119  proto native bool SyncedPress(string action, bool check_focus = true);
120 
128  proto native bool SyncedRelease_ID(int action, bool check_focus = true);
129  proto native bool SyncedRelease(string action, bool check_focus = true);
130 
138  proto native bool SyncedHold_ID(int action, bool check_focus = true);
139  proto native bool SyncedHold(string action, bool check_focus = true);
140 
148  proto native bool SyncedDbl_ID(int action, bool check_focus = true);
149  proto native bool SyncedDbl(string action, bool check_focus = true);
150 
158  proto native bool SyncedClick_ID(int action, bool check_focus = true);
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 
169  proto native void ListCurrentProfile();
170  proto native void ListCurrentPreset();
171  proto native void ListAvailableButtons();
172  proto native void ListActiveGroup();
173 
174  proto native void GetActiveInputs( out TIntArray items );
175 
176  proto native UAInput GetInputByID( int iID );
177  proto native UAInput GetInputByName( string sInputName );
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 
190  proto native UAInput RegisterInput( string sInputName, string sLoc, string sGroupName );
191  proto native void DeRegisterInput( string sInputName );
192 
193  proto native void RegisterGroup( string sGroupName, string sLoc );
194  proto native void DeRegisterGroup( string sGroupName );
195 
196  proto native void UpdateControls(); // call this on each change of exclusion
197  proto native void ActivateGroup( string sGroupName );
198  proto native void ActivateExclude( string sExcludeName );
199  proto native void ActivateContext( string sContextName );
200  proto native void ActivateModificator( string sModName );
201  proto native void DeactivateModificator( string sModName );
202 
203  proto native void DeactivateContext();
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
213  proto native void PresetReset();
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 
238 proto native UAInputAPI GetUApi();
UAIDWrapper
Definition: uainput.c:14
UAInput
Definition: uainput.c:23
SyncedValue
Definition: syncedvalue.c:1
array
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
Definition: isboxcollidinggeometryproxyclasses.c:27
UAInputAPI
Definition: uainput.c:164
GetUApi
proto native UAInputAPI GetUApi()
UAInterface
Definition: uainput.c:95