1 #ifndef HEADER_MOUSESTROKE_H 2 #define HEADER_MOUSESTROKE_H 3 4 #include "V2.h" 5 6 #include "SDL.h" 7 #include <string> 8 9 /** 10 * Contains info about mouse click. 11 */ 12 class MouseStroke { 13 private: 14 Uint8 m_button; 15 V2 m_loc; 16 public: 17 MouseStroke(const SDL_MouseButtonEvent &event); 18 isLeft()19 bool isLeft() const { return m_button == SDL_BUTTON_LEFT; } isMiddle()20 bool isMiddle() const { return m_button == SDL_BUTTON_MIDDLE; } isRight()21 bool isRight() const { return m_button == SDL_BUTTON_RIGHT; } getLoc()22 V2 getLoc() const { return m_loc; } 23 std::string toString() const; 24 }; 25 26 #endif 27