class
#include <nCine/Input/JoyMapping.h>
JoyMapping Provides translation layer for gamepads and joysticks to unified layout.
Public static functions
-
static auto CreateJoystickGuid(std::
uint16_t bus, std:: uint16_t vendor, std:: uint16_t product, std:: uint16_t version, StringView name, std:: uint8_t driverSignature, std:: uint8_t driverData) -> JoystickGuid
Constructors, destructors, conversion operators
Public functions
- void Init(const IInputManager* inputManager)
- void SetHandler(IInputEventHandler* inputEventHandler)
- auto AddMappingsFromString(StringView mappingString) -> bool
- auto AddMappingsFromFile(StringView path) -> bool
-
auto numMappings() const -> std::
int32_t - void OnJoyButtonPressed(const JoyButtonEvent& event)
- void OnJoyButtonReleased(const JoyButtonEvent& event)
- void OnJoyHatMoved(const JoyHatEvent& event)
- void OnJoyAxisMoved(const JoyAxisEvent& event)
- auto OnJoyConnected(const JoyConnectionEvent& event) -> bool
- void OnJoyDisconnected(const JoyConnectionEvent& event)
-
auto IsJoyMapped(std::
int32_t joyId) const -> bool -
auto GetMappedState(std::
int32_t joyId) const -> const JoyMappedState& - void DeadZoneNormalize(Vector2f& joyVector, float deadZoneValue = IInputManager::LeftStickDeadZone) const
-
auto FindMappingByGuid(const JoystickGuid& guid) const -> std::
int32_t -
auto FindMappingByName(const char* name) const -> std::
int32_t