Base class for platform specific implementations of game-pad input devices.
More...
#include <InputDeviceGamepad.h>
Inherited by AzFramework::InputDeviceGamepadLinux, and AzFramework::InputDeviceGamepadWindows.
|
|
using | DigitalButtonIdByBitMaskMap = AZStd::unordered_map< AZ::u32, const InputChannelId * > |
| | Alias for verbose container class.
|
| |
|
|
| AZ_CLASS_ALLOCATOR (Implementation, AZ::SystemAllocator) |
| |
| | Implementation (InputDeviceGamepad &inputDevice) |
| |
|
| AZ_DISABLE_COPY_MOVE (Implementation) |
| |
|
virtual | ~Implementation () |
| | Destructor.
|
| |
| virtual LocalUserId | GetAssignedLocalUserId () const |
| |
|
virtual void | PromptLocalUserSignIn () const |
| | Prompt a local user sign-in request from this input device.
|
| |
| virtual bool | IsConnected () const =0 |
| |
| virtual void | SetVibration (float leftMotorSpeedNormalized, float rightMotorSpeedNormalized)=0 |
| |
| virtual void | SetLightBarColor (const AZ::Color &color) |
| |
|
virtual void | ResetLightBarColor () |
| | Reset the light bar color of the gamepad (if one exists) to it's default.
|
| |
| virtual bool | GetPhysicalKeyOrButtonText (const InputChannelId &, AZStd::string &) const |
| |
|
virtual void | TickInputDevice ()=0 |
| | Tick/update the input device to broadcast all input events since the last frame.
|
| |
|
void | BroadcastInputDeviceConnectedEvent () const |
| | Broadcast an event when the input device connects to the system.
|
| |
|
void | BroadcastInputDeviceDisconnectedEvent () const |
| | Broadcast an event when the input device disconnects from the system.
|
| |
Base class for platform specific implementations of game-pad input devices.
◆ Implementation()
| AzFramework::InputDeviceGamepad::Implementation::Implementation |
( |
InputDeviceGamepad & |
inputDevice | ) |
|
Constructor
- Parameters
-
| [in] | inputDevice | Reference to the input device being implemented |
◆ Create()
Default factory create function
- Parameters
-
| [in] | inputDevice | Reference to the input device being implemented |
◆ GetAssignedLocalUserId()
| virtual LocalUserId AzFramework::InputDeviceGamepad::Implementation::GetAssignedLocalUserId |
( |
| ) |
const |
|
virtual |
Access to the input device's currently assigned local user id
- Returns
- Id of the local user currently assigned to the input device
◆ GetPhysicalKeyOrButtonText()
| virtual bool AzFramework::InputDeviceGamepad::Implementation::GetPhysicalKeyOrButtonText |
( |
const InputChannelId & |
, |
|
|
AZStd::string & |
|
|
) |
| const |
|
inlinevirtual |
Get the text displayed on the physical key/button associated with an input channel.
- Parameters
-
| [in] | inputChannelId | The input channel id whose key or button text to return |
| [out] | o_keyOrButtonText | The text displayed on the physical key/button if found |
- Returns
- True if o_keyOrButtonText was set, false otherwise
◆ IsConnected()
| virtual bool AzFramework::InputDeviceGamepad::Implementation::IsConnected |
( |
| ) |
const |
|
pure virtual |
Query the connected state of the input device
- Returns
- True if the input device is currently connected, false otherwise
◆ ProcessRawGamepadState()
| void AzFramework::InputDeviceGamepad::Implementation::ProcessRawGamepadState |
( |
const RawGamepadState & |
rawGamepadState | ) |
|
|
protected |
Process a game-pad state that has been obtained since the last call to this function. This function is not thread safe, and so should only be called from the main thread.
- Parameters
-
| [in] | rawGamepadState | The raw game-pad state |
◆ SetLightBarColor()
| virtual void AzFramework::InputDeviceGamepad::Implementation::SetLightBarColor |
( |
const AZ::Color & |
color | ) |
|
|
inlinevirtual |
Set the current light bar color of the gamepad (if one exists)
- Parameters
-
| [in] | color | The color to set the gamepad's light bar |
◆ SetVibration()
| virtual void AzFramework::InputDeviceGamepad::Implementation::SetVibration |
( |
float |
leftMotorSpeedNormalized, |
|
|
float |
rightMotorSpeedNormalized |
|
) |
| |
|
pure virtual |
Set the current vibration (force-feedback) speed of the gamepads motors
- Parameters
-
| [in] | leftMotorSpeedNormalized | Speed of the left (large/low frequency) motor |
| [in] | rightMotorSpeedNormalized | Speed of the right (small/high frequency) motor |
The documentation for this class was generated from the following file:
- Code/Framework/AzFramework/AzFramework/Input/Devices/Gamepad/InputDeviceGamepad.h