11 #include "games/controllers/ControllerTypes.h" 12 #include "input/joysticks/interfaces/IInputHandler.h" 13 #include "peripherals/PeripheralTypes.h" 19 class CControllerActivity;
35 void ClearButtonState();
38 float GetActivation()
const;
39 ControllerPtr Appearance()
const {
return m_controllerAppearance; }
43 bool HasFeature(
const std::string& feature)
const override;
44 bool AcceptsInput(
const std::string& feature)
const override;
45 bool OnButtonPress(
const std::string& feature,
bool bPressed)
override;
46 void OnButtonHold(
const std::string& feature,
unsigned int holdTimeMs)
override;
49 unsigned int motionTimeMs)
override;
53 unsigned int motionTimeMs)
override;
60 unsigned int motionTimeMs)
override;
63 unsigned int motionTimeMs)
override;
68 const PERIPHERALS::PeripheralPtr m_peripheral;
71 std::unique_ptr<CControllerActivity> m_controllerActivity;
bool OnWheelMotion(const std::string &feature, float position, unsigned int motionTimeMs) override
A wheel has changed state.
Definition: AgentJoystick.cpp:108
std::string ControllerID() const override
The add-on ID of the game controller associated with this input handler.
Definition: AgentJoystick.cpp:62
bool OnAnalogStickMotion(const std::string &feature, float x, float y, unsigned int motionTimeMs) override
An analog stick has moved.
Definition: AgentJoystick.cpp:99
bool OnButtonPress(const std::string &feature, bool bPressed) override
A digital button has been pressed or released.
Definition: AgentJoystick.cpp:80
bool OnThrottleMotion(const std::string &feature, float position, unsigned int motionTimeMs) override
A throttle has changed state.
Definition: AgentJoystick.cpp:116
bool HasFeature(const std::string &feature) const override
Return true if the input handler accepts the given feature.
Definition: AgentJoystick.cpp:70
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: AgentJoystick.h:26
bool AcceptsInput(const std::string &feature) const override
Return true if the input handler is currently accepting input for the given feature.
Definition: AgentJoystick.cpp:75
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: AgentJoystick.cpp:91
void OnInputFrame() override
Called at the end of the frame that provided input.
Definition: AgentJoystick.cpp:124
bool OnAccelerometerMotion(const std::string &feature, float x, float y, float z) override
An accelerometer's state has changed.
Definition: AgentJoystick.h:54
void OnButtonHold(const std::string &feature, unsigned int holdTimeMs) override
A digital button has been pressed for more than one event frame.
Definition: AgentJoystick.cpp:86