Browse Source

Platform: simple test for Sdl2 and GlfwApplication cursors.

pull/388/head
Vladimír Vondruš 7 years ago
parent
commit
7cb49fbb36
  1. 3
      src/Magnum/Platform/Test/GlfwApplicationTest.cpp
  2. 3
      src/Magnum/Platform/Test/Sdl2ApplicationTest.cpp

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

@ -61,6 +61,9 @@ struct GlfwApplicationTest: Platform::Application {
} else if(event.key() == KeyEvent::Key::T) {
Debug{} << "setting window title";
setWindowTitle("This is a UTF-8 Window Title™!");
} else if(event.key() == KeyEvent::Key::H) {
Debug{} << "toggling hand cursor";
setCursor(cursor() == Cursor::Arrow ? Cursor::Hand : Cursor::Arrow);
}
}

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

@ -86,6 +86,9 @@ struct Sdl2ApplicationTest: Platform::Application {
} else if(event.key() == KeyEvent::Key::T) {
Debug{} << "setting window title";
setWindowTitle("This is a UTF-8 Window Title™!");
} else if(event.key() == KeyEvent::Key::H) {
Debug{} << "toggling hand cursor";
setCursor(cursor() == Cursor::Arrow ? Cursor::Hand : Cursor::Arrow);
}
#ifdef CORRADE_TARGET_EMSCRIPTEN
else if(event.key() == KeyEvent::Key::F) {

Loading…
Cancel
Save