Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
InputManager.c
Go to the documentation of this file.
1/*
2===========================================
3Do not modify, this script is generated
4===========================================
5*/
6
11
19sealed class InputManager: ActionManager
20{
21 private void InputManager();
22 private void ~InputManager();
23
25 proto external float GetLastTimeDelta();
27 proto external void SetLoading(bool isLoading);
34 proto external EInputDeviceType GetLastUsedInputDevice();
35 proto external bool SetLastUsedInputDevice(EInputDeviceType type);
36 proto external KeyboardDeviceHandler GetKeyboardDeviceHandler();
37 proto external MouseDeviceHandler GetMouseDeviceHandler();
38 proto external GamepadDeviceHandler GetGamepadDeviceHandler();
39 proto external JoystickDeviceHandler GetJoystickDeviceHandler();
40 proto external GyroDeviceHandler GetGyroDeviceHandler();
41 proto external TrackIRDeviceHandler GetTrackIRDeviceHandler();
43 proto external bool IsUsingMouseAndKeyboard();
45 [Obsolete("Use MouseDeviceHandler.SetCursorPosition() instead")]
46 proto external void SetCursorPosition(int x, int y);
47 [Obsolete("Use TrackIRDeviceHandler.IsTrackIRConnected() instead")]
48 proto external bool IsTrackIRConnected();
49 [Obsolete("Use JoystickDeviceHandler.IsJoystickConnected() instead")]
50 proto external bool IsJoystickConnected(int iSlotIndex);
51 [Obsolete("Use JoystickDeviceHandler.GetJoystickVendorId() instead")]
52 proto external int GetJoystickVendorId(int iSlotIndex);
53 [Obsolete("Use JoystickDeviceHandler.GetJoystickProductId() instead")]
54 proto external int GetJoystickProductId(int iSlotIndex);
55 [Obsolete("Use JoystickDeviceHandler.GetJoystickProductName() instead")]
56 proto external string GetJoystickProductName(int iSlotIndex);
57 [Obsolete("Use GamepadDeviceHandler.StartRumble() instead")]
58 proto external void SetGamepadRumble(int userIdx, float fLeftMotorSpeed, float fRightMotorSpeed, float fLeftTriggerSpeed, float fRightTriggerSpeed, int iDurationMs = -1, int iFadeInMs = 0, int iFadeOutMs = 0);
59 [Obsolete("Use GamepadDeviceHandler.StopRumble() instead")]
60 proto external void StopRumble(int userIdx = -1);
71 [Obsolete("Use GamepadDeviceHandler.SetTriggerEffect() instead")]
72 proto external void SetGamepadTriggerEffect(int userIdx, GamepadTrigger eTriggerIndex, GamepadTriggerEffect eEffectType, int frequency, notnull array<int> curve);
76 [Obsolete("Use GamepadDeviceHandler.SetLightColor() instead")]
77 proto external void SetGamepadLightColor(int userIdx, notnull Color color);
79 proto external void ResetAction(string actionName);
81 proto external void ResetContext(string contextName);
82 proto external bool RegisterActionManager(ActionManager pManager);
83 proto external bool UnregisterActionManager(ActionManager pManager);
84 proto external ref InputBinding CreateUserBinding();
85 /*
86 Return config for given key. Config is set in project settings (.gproj file) InputManagerSettings.UiMappings
87 \code
88 BaseContainer container = GetGame().GetInputManager().GetKeyUIMapping("keyboard:KC_G");
89 if (container)
90 {
91 string label;
92 container.Get("Label", label);
93 Print("Key label for UI: " + label);
94 }
95 \endcode
96 */
97 proto external BaseContainer GetKeyUIMapping(string keyName);
98 /*
99 Return key binding for given action. Key binding is a tree of combos and alternatives. Method returned key binding tree encoded as binary expression tree (https://en.wikipedia.org/wiki/Binary_expression_tree).
100 Process from right to left.
101 Example: for key binding "P or (CTRL + G)" is keyStack looks like {'KC_G', 'KC_CTRL', '+', 'KC_P', '|'}
102
103 \param actionName name of action
104 \param keyStack stack for keys. Can be: '+' for input combo (binary node followed by two child nodes) or '|' for input sum/alternative (binary node followed by two child nodes) otherwise contains key code (leaf node)
105 \param filterStack contains pointer to InputFilter container for key with the same index on keyStack (size of filterStack is always same as keyStack)
106 \param deviceType filter just key binds for specific device. Leave EInputDeviceType.INVALID to return key binding for last used device
107 \param preset filter just key binds for specific preset. Leave empty to any preset
108 \param keyBindIndex filter just key bind with given index. Leave -1 to all key binds
109
110 \code
111 // Iterate trough key bind stack
112 string ProcessKeybindStack(inout int index, notnull array<string> keyStack)
113 {
114 if (index < 0)
115 return string.Empty;
116
117 // pop back
118 string key = keyStack[index];
119 index--;
120
121 switch(key)
122 {
123 case "+": // combo
124 return ProcessKeybindStack(index, keyStack) + " + " + ProcessKeybindStack(index, keyStack);
125
126 case "|": // sum/alternative
127 return ProcessKeybindStack(index, keyStack) + " | " + ProcessKeybindStack(index, keyStack);
128
129 default: // key value
130 return key;
131 }
132
133 return string.Empty;
134 }
135
136 void DoKeybindTest()
137 {
138 array<string> keyStack = {};
139 array<BaseContainer> filterStack ={};
140 if (GetGame().GetInputManager().GetActionKeybinding("ShowGroupMenu", keyStack, filterStack))
141 {
142 int index = keyStack.Count() - 1;
143 Print("Key bind: " + ProcessKeybindStack(index, keyStack))
144 }
145 }
146 \endcode
147 */
148 proto external bool GetActionKeybinding(string actionName, notnull array<string> keyStack, notnull array<BaseContainer> filterStack, EInputDeviceType deviceType = EInputDeviceType.INVALID, string preset = string.Empty, int keyBindIndex = -1);
149}
150
EDamageType type
Definition Color.c:13
Manages input key bindings, presets, contexts, and device calibration. Provides functions for creatin...
GamepadTrigger