Parse mouse middle

This commit is contained in:
ArthurSonzogni
2021-04-18 18:42:42 +02:00
parent cbd13499ae
commit d685a8655e
5 changed files with 50 additions and 1 deletions

View File

@@ -73,6 +73,22 @@ Event Event::MouseRightDown(std::string input, int x, int y) {
return event;
}
// static
Event Event::MouseMiddleMove(std::string input, int x, int y) {
Event event;
event.input_ = std::move(input);
event.type_ = Type::MouseMiddleMove;
event.mouse_ = {x, y};
return event;
}
// static
Event Event::Special(std::string input) {
Event event;
event.input_ = std::move(input);
return event;
}
// static
Event Event::MouseRightMove(std::string input, int x, int y) {
Event event;
@@ -83,9 +99,11 @@ Event Event::MouseRightMove(std::string input, int x, int y) {
}
// static
Event Event::Special(std::string input) {
Event Event::MouseMiddleDown(std::string input, int x, int y) {
Event event;
event.input_ = std::move(input);
event.type_ = Type::MouseMiddleDown;
event.mouse_ = {x, y};
return event;
}