Input.h 730 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #ifndef DEF_INPUT
  2. #define DEF_INPUT
  3. // Include
  4. #include <SDL2/SDL.h>
  5. // Classe
  6. class Input
  7. {
  8. public:
  9. Input();
  10. ~Input();
  11. void updateEvenements();
  12. bool terminer() const;
  13. void afficherPointeur(bool reponse) const;
  14. void capturerPointeur(bool reponse) const;
  15. bool getTouche(const SDL_Scancode touche) const;
  16. bool getBoutonSouris(const Uint8 bouton) const;
  17. bool mouvementSouris() const;
  18. int getX() const;
  19. int getY() const;
  20. int getXRel() const;
  21. int getYRel() const;
  22. private:
  23. SDL_Event m_evenements;
  24. bool m_touches[SDL_NUM_SCANCODES];
  25. bool m_boutonsSouris[8];
  26. int m_x;
  27. int m_y;
  28. int m_xRel;
  29. int m_yRel;
  30. bool m_terminer;
  31. };
  32. #endif