11 #include "games/controllers/ControllerTypes.h" 12 #include "input/joysticks/interfaces/IInputHandler.h" 13 #include "peripherals/PeripheralTypes.h" 19 class CControllerActivity;
37 float GetActivation()
const;
38 ControllerPtr Appearance()
const {
return m_controllerAppearance; }
42 bool HasFeature(
const std::string& feature)
const override;
43 bool AcceptsInput(
const std::string& feature)
const override;
44 bool OnButtonPress(
const std::string& feature,
bool bPressed)
override;
45 void OnButtonHold(
const std::string& feature,
unsigned int holdTimeMs)
override;
48 unsigned int motionTimeMs)
override;
52 unsigned int motionTimeMs)
override;
59 unsigned int motionTimeMs)
override;
62 unsigned int motionTimeMs)
override;
67 const PERIPHERALS::PeripheralPtr m_peripheral;
70 std::unique_ptr<CControllerActivity> m_controllerActivity;
bool OnAccelerometerMotion(const std::string &feature, float x, float y, float z) override
An accelerometer's state has changed.
Definition: GameAgentJoystick.h:53
bool OnAnalogStickMotion(const std::string &feature, float x, float y, unsigned int motionTimeMs) override
An analog stick has moved.
Definition: GameAgentJoystick.cpp:93
bool OnThrottleMotion(const std::string &feature, float position, unsigned int motionTimeMs) override
A throttle has changed state.
Definition: GameAgentJoystick.cpp:110
bool OnButtonMotion(const std::string &feature, float magnitude, unsigned int motionTimeMs) override
An analog button (trigger or a pressure-sensitive button) has changed state.
Definition: GameAgentJoystick.cpp:85
std::string ControllerID() const override
The add-on ID of the game controller associated with this input handler.
Definition: GameAgentJoystick.cpp:56
bool OnButtonPress(const std::string &feature, bool bPressed) override
A digital button has been pressed or released.
Definition: GameAgentJoystick.cpp:74
bool AcceptsInput(const std::string &feature) const override
Return true if the input handler is currently accepting input for the given feature.
Definition: GameAgentJoystick.cpp:69
Definition: AudioDecoder.h:18
std::shared_ptr< CController > ControllerPtr
Smart pointer to a game controller (CController)
Definition: ControllerTypes.h:25
Handles game controller events for game agent functionality.
Definition: GameAgentJoystick.h:26
bool HasFeature(const std::string &feature) const override
Return true if the input handler accepts the given feature.
Definition: GameAgentJoystick.cpp:64
void OnButtonHold(const std::string &feature, unsigned int holdTimeMs) override
A digital button has been pressed for more than one event frame.
Definition: GameAgentJoystick.cpp:80
bool OnWheelMotion(const std::string &feature, float position, unsigned int motionTimeMs) override
A wheel has changed state.
Definition: GameAgentJoystick.cpp:102
void OnInputFrame() override
Called at the end of the frame that provided input.
Definition: GameAgentJoystick.cpp:118