2017-10-06 20:48:14 +01:00
|
|
|
#ifndef GAMEPADPADDLE_H
|
|
|
|
#define GAMEPADPADDLE_H
|
|
|
|
|
|
|
|
#include "linux/paddle.h"
|
|
|
|
|
2019-11-30 15:48:48 +00:00
|
|
|
class QGamepad;
|
|
|
|
class QString;
|
|
|
|
|
2017-10-06 20:48:14 +01:00
|
|
|
class GamepadPaddle : public Paddle
|
|
|
|
{
|
|
|
|
public:
|
2019-11-24 19:30:34 +00:00
|
|
|
static std::shared_ptr<Paddle> fromName(const QString & name);
|
2017-10-06 20:48:14 +01:00
|
|
|
|
2021-01-31 13:55:43 +00:00
|
|
|
bool getButton(int i) const override;
|
|
|
|
double getAxis(int i) const override;
|
2017-10-06 20:48:14 +01:00
|
|
|
|
|
|
|
private:
|
2019-11-24 19:30:34 +00:00
|
|
|
GamepadPaddle(const std::shared_ptr<QGamepad> & gamepad);
|
2017-10-06 20:48:14 +01:00
|
|
|
const std::shared_ptr<QGamepad> myGamepad;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // GAMEPADPADDLE_H
|