Private Member Functions | |
proto native void | ChangeGameFocus (int add, int input_device=-1) |
Change game focus number. | |
proto native void | ResetGameFocus (int input_device=-1) |
Reset game focus number (set to 0) | |
proto native bool | HasGameFocus (int input_device=-1) |
Check if game should have focus. | |
proto native int | GetActionGroupsCount () |
proto native int | GetActionGroupSize (int group_index) |
proto int | GetActionGroupName (int group_index, out string name) |
proto int | GetActionDesc (int action_index, out string desc) |
proto native float | LocalValue_ID (int action, bool check_focus=true) |
Get action state. | |
proto native float | LocalValue (string action, bool check_focus=true) |
proto native bool | LocalPress_ID (int action, bool check_focus=true) |
Returns true just in frame, when action was invoked (button was pressed) | |
proto native bool | LocalPress (string action, bool check_focus=true) |
proto native bool | LocalRelease_ID (int action, bool check_focus=true) |
Returns true just in frame, when release action happened (button was released) | |
proto native bool | LocalRelease (string action, bool check_focus=true) |
proto native bool | LocalHold_ID (int action, bool check_focus=true) |
Returns true just in frame, when hold action invoked (button is hold) | |
proto native bool | LocalHold (string action, bool check_focus=true) |
proto native bool | LocalDbl_ID (int action, bool check_focus=true) |
Returns true just in frame, when double click action invoked (button double clicked) | |
proto native bool | LocalDbl (string action, bool check_focus=true) |
proto native void | DisableKey (int key) |
Disable key until end of frame. | |
proto native void | EnableMouseAndKeyboard (bool enable) |
Enable mouse and keyboard (on consoles) | |
proto native bool | IsEnabledMouseAndKeyboard () |
proto native void | EnableGamepad (bool enable) |
Enable gamepad (on PC) | |
proto native bool | IsEnabledGamepad () |
proto native bool | IsEnabledMouseAndKeyboardEvenOnServer () |
proto native bool | IsMouseConnected () |
proto native bool | IsKeyboardConnected () |
proto native int | GetCurrentProfile () |
gets currently selected profile | |
proto native void | GetCurrentProfileActionKeys (int action_index, out TIntArray keys) |
proto int | GetProfileName (int profile_index, out string name) |
gets profile by index | |
proto native int | GetProfilesCount () |
gets profile by name | |
proto native int | SetProfile (int index) |
setting active profile | |
proto native int | GetDevicesCount () |
proto int | GetDeviceName (int device_index, out string name) |
proto native int | IsDeviceXInput (int device_index) |
proto native int | IsDeviceEnabled (int device_index) |
proto native void | SetDeviceEnabled (int device_index, bool enabled) |
proto bool | GetGamepadThumbDirection (GamepadButton thumbButton, out float angle, out float value) |
return true if was deflected button. | |
proto native void | ResetActiveGamepad () |
clears active gamepad | |
proto native void | SelectActiveGamepad (int gamepad) |
proto native void | GetGamepadList (out array< int > gamepads) |
proto void | GetGamepadUser (int gamepad, out BiosUser user) |
proto native void | IdentifyGamepad (GamepadButton button) |
the on OnGamepadIdentification callback will return the first gamepad where the button was pressed | |
proto native bool | IsActiveGamepadSelected () |
returns true if there is an active gamepad selected. | |
bool | IsAnyInputDeviceActive () |
returns true if 'Gamepad' or 'Mouse and Keyboard' is connected | |
bool | AreAllAllowedInputDevicesActive (out array< int > unavailableDeviceList=null) |
returns true if 'Gamepad' or if 'Mouse/Keyboard' control is allowed locally and on server, and the respective input devicse are connected. Gamepad takes priority. | |
void | FillUnavailableDeviceArray (int device, inout array< int > filler) |
void | UpdateConnectedInputDeviceList () |
currently lists only available Gamepad, Mouse, and Keyboard. Extendable as needed. | |
proto native EInputDeviceType | GetCurrentInputDevice () |
proto native GamepadButton | GetEnterButton () |
void | OnGamepadConnected (int gamepad) |
callback that is fired when a new gamepad is connected | |
void | OnGamepadDisconnected (int gamepad) |
callback that is fired when gamepad is disconnected | |
void | OnGamepadIdentification (int gamepad) |
callback that is fired when identification was requested | |
int | GetUserGamepad (BiosUser user) |
bool | IsInactiveGamepadOrUserSelected (int gamepad=-1) |
void | OnMouseConnected () |
void | OnMouseDisconnected () |
void | OnKeyboardConnected () |
void | OnKeyboardDisconnected () |
void | OnLastInputDeviceChanged (EInputDeviceType inputDevice) |
called from code on different input device use | |
returns true if 'Gamepad' or if 'Mouse/Keyboard' control is allowed locally and on server, and the respective input devicse are connected. Gamepad takes priority.
unavailableDeviceList | lists all devices that SHOULD be available, but aren't. Optional. |
References FillUnavailableDeviceArray(), g_Game, IsActiveGamepadSelected(), IsEnabledMouseAndKeyboard(), IsEnabledMouseAndKeyboardEvenOnServer(), IsKeyboardConnected(), and IsMouseConnected().
Referenced by CGame::UpdateInputDeviceDisconnectWarning().
Change game focus number.
add | number to add to focus number |
input_device | if equals -1, works globally on all devices, see INPUT_DEVICE_* values in constants.h |
Referenced by PluginBase::CaptureFocus(), CaptureFocus(), PluginBase::FreeCameraControlDisable(), PluginBase::FreeCameraControlEnable(), UIMenuPanel::LockControls(), DayZPlayer::LockControls(), UIScriptedMenu::OnMouseButtonDown(), PluginBase::ReleaseFocus(), ReleaseFocus(), PluginBase::SetDeveloperItemClientEx(), PluginBase::ToggleFocus(), and UIMenuPanel::UnlockControls().
|
private |
Disable key until end of frame.
key | id of key, defined in KeyCode proto native Input GetInput() proto native CGame GetGame() |
Referenced by MissionBase::OnUpdate().
|
private |
Enable gamepad (on PC)
Referenced by UIScriptedMenu::Init(), and UIScriptedMenu::~ServerBrowserMenuNew().
|
private |
Enable mouse and keyboard (on consoles)
Referenced by AreAllAllowedInputDevicesActive().
Referenced by ScriptedWidgetEventHandler::Reload(), and ScriptedWidgetEventHandler::TutorialKeybinds().
Referenced by ScriptedWidgetEventHandler::KeybindingsGroup().
|
private |
|
private |
Referenced by OnWidgetScriptInit(), UIScriptedMenu::UpdateControlsElements(), UIScriptedMenu::UpdateControlsElementVisibility(), WarningMenuBase::UpdateControlsElementVisibility(), ActionTargetsCursor::UpdatePCIconsVisibility(), and ScriptedWidgetEventHandler::UpdatePCIconsVisibility().
|
private |
gets currently selected profile
Referenced by UIScriptedMenu::Init(), ScriptedWidgetEventHandler::InitPresets(), and UIScriptedMenu::InitPresets().
|
private |
|
private |
Referenced by GetUserGamepad().
|
private |
return true if was deflected button.
Referenced by UpdataControllerInput().
Referenced by GetUserGamepad(), IsInactiveGamepadOrUserSelected(), OnGamepadConnected(), and CGame::SelectUser().
gets profile by index
Referenced by UIScriptedMenu::GetControlMappingInfo(), UIScriptedMenu::Init(), ScriptedWidgetEventHandler::InitPresets(), UIScriptedMenu::InitPresets(), ScriptedWidgetEventHandler::OnSelectConsolePreset(), ScriptedWidgetEventHandler::OnSelectKBPreset(), UIScriptedMenu::OnSelectKBPreset(), and InputUtils::UpdateConsolePresetID().
|
private |
gets profile by name
Referenced by UIScriptedMenu::Init(), ScriptedWidgetEventHandler::InitPresets(), and UIScriptedMenu::InitPresets().
References GetGamepadList(), and GetGamepadUser().
Referenced by CGame::GamepadCheck().
Check if game should have focus.
input_device | if equals -1, checks all devices, see INPUT_DEVICE_* values in constants.h |
|
private |
the on OnGamepadIdentification callback will return the first gamepad where the button was pressed
button | the button that needs to be pressed for the identification |
Referenced by CGame::GamepadCheck(), BiosUserManager::OnJoin(), and CGame::SelectUser().
|
private |
returns true if there is an active gamepad selected.
Referenced by AreAllAllowedInputDevicesActive(), IsAnyInputDeviceActive(), IsInactiveGamepadOrUserSelected(), and UpdateConnectedInputDeviceList().
|
inlineprivate |
returns true if 'Gamepad' or 'Mouse and Keyboard' is connected
References IsActiveGamepadSelected(), IsKeyboardConnected(), and IsMouseConnected().
|
private |
|
private |
Referenced by AreAllAllowedInputDevicesActive(), UIScriptedMenu::OnInputDeviceChanged(), UIScriptedMenu::OnShow(), UIScriptedMenu::UpdateControlsElementVisibility(), and WarningMenuBase::UpdateControlsElementVisibility().
|
private |
Referenced by AreAllAllowedInputDevicesActive(), UIScriptedMenu::OnInputDeviceChanged(), UIScriptedMenu::OnShow(), MissionBase::OnUpdate(), OnWidgetScriptInit(), ScriptedWidgetEventHandler::OptionsMenuControls(), RadialMenu(), UIScriptedMenu::UpdateControlsElements(), UIScriptedMenu::UpdateControlsElementVisibility(), ActionTargetsCursor::UpdatePCIconsVisibility(), ScriptedWidgetEventHandler::UpdatePCIconsVisibility(), UIMenuPanel::UseKeyboard(), and UIMenuPanel::UseMouse().
References g_Game, GetGame(), GetGamepadUser(), and IsActiveGamepadSelected().
Referenced by OnGamepadDisconnected().
|
private |
Referenced by AreAllAllowedInputDevicesActive(), IsAnyInputDeviceActive(), and UpdateConnectedInputDeviceList().
|
private |
Referenced by AreAllAllowedInputDevicesActive(), CGame::CanDisplayMouseCursor(), IsAnyInputDeviceActive(), and UpdateConnectedInputDeviceList().
Returns true just in frame, when double click action invoked (button double clicked)
action | id of action, defined in 4_World/Classes/UserActionsComponent/_constants.c |
check_focus | if true and game is unfocused, returns 0; otherwise returns actual value |
Returns true just in frame, when hold action invoked (button is hold)
action | id of action, defined in 4_World/Classes/UserActionsComponent/_constants.c |
check_focus | if true and game is unfocused, returns 0; otherwise returns actual value |
Returns true just in frame, when action was invoked (button was pressed)
action | id of action, defined in 4_World/Classes/UserActionsComponent/_constants.c |
check_focus | if true and game is unfocused, returns 0; otherwise returns actual value |
Referenced by HandleInput().
Returns true just in frame, when release action happened (button was released)
action | id of action, defined in 4_World/Classes/UserActionsComponent/_constants.c |
check_focus | if true and game is unfocused, returns 0; otherwise returns actual value |
Get action state.
action | id of action, defined in 4_World/Classes/UserActionsComponent/_constants.c |
check_focus | if true and game is unfocused, returns 0; otherwise returns actual value |
|
inlineprivate |
callback that is fired when a new gamepad is connected
References g_Game, GetGame(), GetGamepadUser(), CGame::GetMission(), Mission::GetOnInputDeviceConnected(), ScriptInvoker::Invoke(), and SelectActiveGamepad().
|
inlineprivate |
callback that is fired when gamepad is disconnected
References g_Game, GetGame(), CGame::GetMission(), Mission::GetOnInputDeviceDisconnected(), ScriptInvoker::Invoke(), IsInactiveGamepadOrUserSelected(), and UpdateConnectedInputDeviceList().
|
inlineprivate |
callback that is fired when identification was requested
References g_Game, GetGame(), CGame::GetMission(), Mission::GetOnInputDeviceConnected(), ScriptInvoker::Invoke(), Mission::Reset(), SelectActiveGamepad(), and UpdateConnectedInputDeviceList().
|
inlineprivate |
callback that is fired when keyboard is connected (PS: and assigned to the user) does not fire on PC - mouse/keyboard assumed to always be connected
References g_Game, GetGame(), CGame::GetMission(), Mission::GetOnInputDeviceConnected(), ScriptInvoker::Invoke(), and UpdateConnectedInputDeviceList().
|
inlineprivate |
callback that is fired when keyboard is disconnected does not fire on PC - mouse/keyboard assumed to always be connected
References g_Game, GetGame(), CGame::GetMission(), Mission::GetOnInputDeviceDisconnected(), ScriptInvoker::Invoke(), and UpdateConnectedInputDeviceList().
|
inlineprivate |
called from code on different input device use
References g_Game, GetGame(), CGame::GetMission(), Mission::GetOnInputDeviceChanged(), and ScriptInvoker::Invoke().
|
inlineprivate |
callback that is fired when mouse is connected (PS: and assigned to the user) does not fire on PC - mouse/keyboard assumed to always be connected
References g_Game, GetGame(), CGame::GetMission(), Mission::GetOnInputDeviceConnected(), ScriptInvoker::Invoke(), and UpdateConnectedInputDeviceList().
|
inlineprivate |
callback that is fired when mouse is disconnected does not fire on PC - mouse/keyboard assumed to always be connected
References g_Game, GetGame(), CGame::GetMission(), Mission::GetOnInputDeviceDisconnected(), ScriptInvoker::Invoke(), and UpdateConnectedInputDeviceList().
|
private |
clears active gamepad
Referenced by BiosUserManager::OnSignedOut(), BiosUserManager::OnUserLoggedOn(), BiosUserManager::OnUserPicked(), and CGame::SelectUser().
|
private |
Reset game focus number (set to 0)
input_device | if equals -1, works globally on all devices, see INPUT_DEVICE_* values in constants.h |
Referenced by UIScriptedMenu::OnMouseButtonDown(), ReleaseFocus(), and PluginBase::ToggleFocus().
|
private |
Referenced by OnGamepadConnected(), OnGamepadIdentification(), and CGame::SelectUser().
setting active profile
Referenced by UIScriptedMenu::OnClick(), ScriptedWidgetEventHandler::OnSelectConsolePreset(), ScriptedWidgetEventHandler::OnSelectKBPreset(), and SwitchPreset().
|
inlineprivate |
currently lists only available Gamepad, Mouse, and Keyboard. Extendable as needed.
References g_Game, IsActiveGamepadSelected(), IsKeyboardConnected(), and IsMouseConnected().
Referenced by CGame::DeferredInit(), OnGamepadDisconnected(), OnGamepadIdentification(), OnKeyboardConnected(), OnKeyboardDisconnected(), OnMouseConnected(), and OnMouseDisconnected().