Add mouse implementation of most components.

This commit is contained in:
ArthurSonzogni
2021-04-18 22:33:41 +02:00
parent d685a8655e
commit 890a41a64c
20 changed files with 239 additions and 12 deletions

View File

@@ -59,6 +59,7 @@ struct Event {
bool is_character() const { return type_ == Type::Character;}
wchar_t character() const { return character_; }
bool is_mouse() const;
bool is_mouse_left_down() const { return type_ == Type::MouseLeftDown; }
bool is_mouse_left_move() const { return type_ == Type::MouseLeftMove; }
bool is_mouse_middle_down() const { return type_ == Type::MouseMiddleDown; }
@@ -74,6 +75,8 @@ struct Event {
bool operator==(const Event& other) const { return input_ == other.input_; }
void MoveMouse(int dx, int dy);
//--- State section ----------------------------------------------------------
private:
enum class Type {