DayZ 1.30
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
UAInput.c
См. документацию.
1
3
4#ifdef INPUT_OVERRIDE
5enum OverrideInputType
6{
7 PRESS, // One time input
8 HOLD, // Permanent input
9 CLICK, // One time click
10 DBL_CLICK, // Double click
11 RELEASE // Release
12};
13#endif
14
15// constants for device (binding device) type determine:
16//
17// EUAINPUT_DEVICE_KEYBOARD
18// EUAINPUT_DEVICE_MOUSE
19// EUAINPUT_DEVICE_KEYBOARDMOUSE
20// EUAINPUT_DEVICE_CONTROLLER
21// EUAINPUT_DEVICE_IR
22
23// -------------------------------------------------------------------------
25{
26 private void UAIDWrapper() {}
27 private void ~UAIDWrapper() {}
28
29 proto native UAInput InputP(); // get input pointer
30};
31
32// -------------------------------------------------------------------------
34{
35 proto native int ID(); // return input index
36 proto native int NameHash(); // return input hash
37
38 proto native int BindingCount(); // return binding count
39 proto native int Binding( int iIndex ); // return binding at index
40
41 proto native void ClearBinding(); // remove all bindings
42
43 proto native void BindCombo( string sButtonName ); // bind combo to this input by name (single/ or append to existing button)
44 proto native void BindComboByHash( int iHash ); // bind combo to this input by hash (single/ or append to existing button)
45
46 proto native void AddAlternative(); // add new alternative keybind
47 proto native void ClearAlternative( int iIndex ); // clear binding alternative by index
48 proto native void SelectAlternative( int iIndex ); // select binding alternative by index
49 proto native int AlternativeCount(); // get currently assigned alternative count
50 proto native int AlternativeIndex(); // get currently selected alternative index
51 proto native void ClearDeviceBind( int iDeviceFlags ); // clear binding for specific device(s)
52
53 proto native int BindKeyCount(); // binded key count (for selected alternative)
54 proto native int GetBindKey( int iIndex ); // binded "control" at index (for selected alternative)
55 proto native int GetBindDevice( int iIndex ); // binded "control" device type at index (for selected alternative)
56 proto native bool CheckBindDevice( int iIndex, int iDeviceFlags ); // compare binded device "control" type :: EUAINPUT_DEVICE_KEYBOARD for example
57
58 proto native float LocalValue();
59
60 proto native bool LocalPress();
61 proto native bool LocalRelease();
62 proto native bool LocalHold();
63 proto native bool LocalHoldBegin();
64 proto native bool LocalDoubleClick();
65 proto native bool LocalClick();
66
67 proto native bool IsCombo(); // return true if there is currently combo bind - use Binding() result !!!
68
69 // normal state is there are no limits, input generates all the events
70 // but if there is an limiter,
71 proto native bool IsLimited(); // return true if there is an event limit
72
73 proto native bool IsLimitConditionActive(); // return true if event limits matches current control item activity
74
75 proto native bool IsPressLimit(); // if limited to PRESS
76 proto native bool IsReleaseLimit(); // if limited to RELEASE
77 proto native bool IsHoldLimit(); // if limited to HOLD
78 proto native bool IsHoldBeginLimit(); // if limited to HOLDBEGIN
79 proto native bool IsClickLimit(); // if limited to SINGLE CLICK
80 proto native bool IsDoubleClickLimit(); // if limited to DOUBLE CLICK
81
82 proto native bool HasSorting( int iIndex ); // has sorting group index?
83
84 proto native void Supress(); // supress press event for next frame (while not pressed ATM - otherwise until release)
85
86 // 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.
87 proto native bool IsLocked(); // determine if locked (not active ATM)
88 proto native void Lock(); // lock (until unlock called or exclusion is selected)
89 proto native void Unlock(); // unlock exclusively
90
91 proto native int ConflictCount(); // get number of conflicts with other inputs
92
93 proto native void ForceEnable( bool bEnable ); // force enable on/ off
94 proto native void ForceDisable( bool bEnable ); // force disable on/ off
95
96 proto native void Backlit_Override( int eType, int iColor ); // enable/ disable backlit of associated controls (EUABACKLIT_*)
97 proto native bool Backlit_Enabled(); // check whether associated controls are backlit
98
99 proto native UAIDWrapper GetPersistentWrapper(); // create persistent object for input access
100
101 private void UAInput();
102 private void ~UAInput();
103};
104
105// -------------------------------------------------------------------------
107{
108 private void UAInterface() {}
109 private void ~UAInterface() {}
110
111 // getting action state
119 proto native float SyncedValue_ID(int action, bool check_focus = true);
120 proto native float SyncedValue(string action, bool check_focus = true);
121
129 proto native bool SyncedPress_ID(int action, bool check_focus = true);
130 proto native bool SyncedPress(string action, bool check_focus = true);
131
139 proto native bool SyncedRelease_ID(int action, bool check_focus = true);
140 proto native bool SyncedRelease(string action, bool check_focus = true);
141
149 proto native bool SyncedHold_ID(int action, bool check_focus = true);
150 proto native bool SyncedHold(string action, bool check_focus = true);
151
159 proto native bool SyncedDbl_ID(int action, bool check_focus = true);
160 proto native bool SyncedDbl(string action, bool check_focus = true);
161
169 proto native bool SyncedClick_ID(int action, bool check_focus = true);
170 proto native bool SyncedClick(string action, bool check_focus = true);
171
172#ifdef INPUT_OVERRIDE
179 proto native bool SyncedOverride_ID(int action, float value, OverrideInputType type, bool oneTime);
180 proto native bool SyncedOverride(string action, float value, OverrideInputType type, bool oneTime);
181
187 proto native bool SyncedRemoveOverride_ID(int action);
188 proto native bool SyncedRemoveOverride(string action);
189
190 proto native bool SyncedRemoveAllOverrides();
191
200 proto bool SyncedGetInputOverride(int action, OverrideInputType type, bool countUsage, out float value);
201#endif
202};
203
204// -------------------------------------------------------------------------
206{
207 private void UAInputAPI() {}
208 private void ~UAInputAPI() {}
209
210 proto native void ListCurrentProfile();
211 proto native void ListCurrentPreset();
212 proto native void ListAvailableButtons();
213 proto native void ListActiveGroup();
214
215 proto native void GetActiveInputs( out TIntArray items );
216
217 proto native UAInput GetInputByID( int iID );
218 proto native UAInput GetInputByName( string sInputName );
219
220 proto native owned string GetButtonName( int iHash ); // get localized name for any button hash
221 proto native owned string GetButtonIcon( int iHash ); // get associated icon path for any button hash
222
223 proto native int ModificatorCount(); // modificator count
224 proto native owned string GetModificatorName( int index ); // modificator name
225
226 // for options only mapping, do not call normally as it is not performance wise!
227 proto native int DeterminePressedButton(); // recently pressed key, mouse button or pad button (returns zero if nothing pressed)
228 proto native int DeterminedCount(); // all buttons (keys, etc.) pressed during determination test (call only when DeterminePressedButton() returned something !)
229 proto native int GetDetermined( int iIndex ); // total count of pressed buttons (call only when DeterminePressedButton() returned something !)
230
231 proto native UAInput RegisterInput( string sInputName, string sLoc, string sGroupName );
232 proto native void DeRegisterInput( string sInputName );
233
234 proto native void RegisterGroup( string sGroupName, string sLoc );
235 proto native void DeRegisterGroup( string sGroupName );
236
237 proto native void UpdateControls(); // call this on each change of exclusion
238 proto native void ActivateGroup( string sGroupName );
239 proto native void ActivateExclude( string sExcludeName );
240 proto native void ActivateContext( string sContextName );
241 proto native void ActivateModificator( string sModName );
242 proto native void DeactivateModificator( string sModName );
243
244 proto native void DeactivateContext();
245
246 proto native bool PresetCreateNew(); // create new dynamic preset from the selected one. False == cannot create new == too many presets (current max == 6)
247 proto native bool PresetDelete( int index ); // delete specific preset - (false == not deletable!)
248 proto native int PresetCurrent(); // determine index of current preset - (-1 == not selected)
249 proto native void PresetSelect( int index ); // select specific preset
254 proto native void PresetReset();
255 proto native int PresetCount(); // count of presets
256 proto native owned string PresetName( int index ); // name of selected preset
257
258 proto native int SortingCount(); // sorting group count
259 proto native owned string SortingName( int index ); // sorting group name (different from localization!)
260 proto native owned string SortingLocalization( int index ); // sorting group localized name
261
262 proto native void Export(); // export XML (user) configuration
263 proto native void Revert(); // revert XML (user) configuration - all of it and use default PBO content! Auto-exports afterward.
264 proto native void SaveInputPresetMiscData(); // saves preset index on consoles, where the regular XMLs are unavailable
265 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)
266
267 proto native void Backlit_None(); // turn off backlit
268 proto native void Backlit_Background( int eType, int iColor1, int iColor2 ); // start backlit
269 proto native void Backlit_Animation( string strName, float fLifeTime, int iColor1, int iColor2 ); // start backlit animation and after time limit -> continue with another one
270 proto native bool Backlit_Enabled(); // check whether backlit active
271 proto native void Backlit_KeyByHash( int uHash, int eLayer, int eType, int iColor ); // key directly (during keybinding process) (EUABACKLIT_*)
272 proto native void Backlit_KeyByName( string strName, int eLayer, int eType, int iColor ); // key directly (by name) (EUABACKLIT_*)
273 proto native void Backlit_Remove( int eLayer ); // turn off layer of backlit
274 proto native void Backlit_ForceUpdate(); // this forces update immediately - USE ONLY IN LOADING SEQUENCE !!!
275 proto native void Backlit_EmptyQueue(); // empty queue of animations - use if you want to play something immediately
276
277};
278
279proto native UAInputAPI GetUApi();
@ RELEASE
Определения EasterEgg.c:4
proto native UAInputAPI GetUApi()
proto native UAInput InputP()
void UAIDWrapper()
Определения UAInput.c:26
void ~UAIDWrapper()
Определения UAInput.c:27
Определения UAInput.c:25
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 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()
Определения UAInput.c:208
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()
Определения UAInput.c:207
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()
Определения UAInput.c:206
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()
Определения UAInput.c:34
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()
Определения UAInput.c:108
void ~UAInterface()
Определения UAInput.c:109
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)
array< int > TIntArray
Определения EnScript.c:733