123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- #ifndef INPUTANDJOY_H_INCLUDED
- #define INPUTANDJOY_H_INCLUDED
- #include <SDL2/SDL.h>
- #include <iostream>
- #include <vector>
- #include "Input.h"
- struct GamePadData;
- class InputAndJoy : public Input {
- public:
- InputAndJoy();
- virtual ~InputAndJoy();
- virtual void updateEvents();
- protected:
- bool catchPadEvents(const SDL_Event &event);
- public:
- int getAxeValue(const Uint8 axeID, Sint32 joyID = 0) const;
- bool getButtonPad(const Uint8 button, Sint32 joyID = 0) const;
- unsigned long getNbPads() const;
- private:
- std::vector<GamePadData*> m_pad;
- };
- #endif
|