Browse Source

Platform: print key release events in application tests as well.

pull/594/head
Vladimír Vondruš 4 years ago
parent
commit
50216faa9e
  1. 6
      src/Magnum/Platform/Test/GlfwApplicationTest.cpp
  2. 4
      src/Magnum/Platform/Test/Sdl2ApplicationTest.cpp

6
src/Magnum/Platform/Test/GlfwApplicationTest.cpp

@ -96,6 +96,12 @@ struct GlfwApplicationTest: Platform::Application {
}
}
void keyReleaseEvent(KeyEvent& event) override {
#if GLFW_VERSION_MAJOR*100 + GLFW_VERSION_MINOR >= 302
Debug{} << "key release event:" << int(event.key()) << event.keyName();
#endif
}
void mouseMoveEvent(MouseMoveEvent& event) override {
Debug{} << "mouse move event:" << event.position() << event.relativePosition() << UnsignedInt(event.buttons());
}

4
src/Magnum/Platform/Test/Sdl2ApplicationTest.cpp

@ -140,6 +140,10 @@ struct Sdl2ApplicationTest: Platform::Application {
}
}
void keyReleaseEvent(KeyEvent& event) override {
Debug{} << "key release event:" << SDL_Keycode(event.key()) << event.keyName();
}
void textInputEvent(TextInputEvent& event) override {
Debug{} << "text input event:" << event.text();
}

Loading…
Cancel
Save