Skip to content

Commit

Permalink
Platform: testing for wheel events.
Browse files Browse the repository at this point in the history
  • Loading branch information
mosra committed Jun 5, 2019
1 parent 6e5f6b8 commit 733d417
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
12 changes: 7 additions & 5 deletions src/Magnum/Platform/Test/EmscriptenApplicationTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,19 @@ struct EmscriptenApplicationTest: Platform::Application {

/* For testing event coordinates */
void mousePressEvent(MouseEvent& event) override {
Debug{} << "press" << event.position() << Int(event.button());
Debug{} << "mouse press event:" << event.position() << Int(event.button());
}

/* For testing event coordinates */
void mouseReleaseEvent(MouseEvent& event) override {
Debug{} << "release" << event.position() << Int(event.button());
Debug{} << "mouse release event:" << event.position() << Int(event.button());
}

/* For testing event coordinates */
void mouseMoveEvent(MouseMoveEvent& event) override {
Debug{} << "move" << event.position();
Debug{} << "mouse move event:" << event.position() << Int(event.buttons());
}

void mouseScrollEvent(MouseScrollEvent& event) override {
Debug{} << "mouse scroll event:" << event.offset() << event.position();
}

/* For testing keyboard capture */
Expand Down
14 changes: 13 additions & 1 deletion src/Magnum/Platform/Test/Sdl2ApplicationTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,19 @@ struct Sdl2ApplicationTest: Platform::Application {

/* For testing event coordinates */
void mousePressEvent(MouseEvent& event) override {
Debug{} << "mouse press event:" << event.position();
Debug{} << "mouse press event:" << event.position() << Int(event.button());
}

void mouseReleaseEvent(MouseEvent& event) override {
Debug{} << "mouse release event:" << event.position() << Int(event.button());
}

void mouseMoveEvent(MouseMoveEvent& event) override {
Debug{} << "mouse move event:" << event.position() << Uint32(event.buttons());
}

void mouseScrollEvent(MouseScrollEvent& event) override {
Debug{} << "mouse scroll event:" << event.offset() << event.position();
}

void keyPressEvent(KeyEvent& event) override {
Expand Down

0 comments on commit 733d417

Please sign in to comment.