Browse Source

Platform: add a test for Sdl2Application::setContainerCssClass().

pull/331/head
Vladimír Vondruš 7 years ago
parent
commit
cfd9b5d39c
  1. 11
      src/Magnum/Platform/Test/Sdl2ApplicationTest.cpp

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

@ -64,6 +64,12 @@ struct Sdl2ApplicationTest: Platform::Application {
Debug{} << "stopping text input";
stopTextInput();
}
#ifdef CORRADE_TARGET_EMSCRIPTEN
else if(event.key() == KeyEvent::Key::F) {
Debug{} << "toggling fullscreen";
setContainerCssClass((_fullscreen ^= true) ? "fullsize" : "");
}
#endif
}
void textInputEvent(TextInputEvent& event) override {
@ -78,6 +84,11 @@ struct Sdl2ApplicationTest: Platform::Application {
d << "any event:" << event.type;
if(event.type == SDL_WINDOWEVENT) d << event.window.event;
}
#ifdef CORRADE_TARGET_EMSCRIPTEN
private:
bool _fullscreen = false;
#endif
};
}}}}

Loading…
Cancel
Save