From cfd9b5d39ce7ae6922373f73c1207d0a970f795e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 11 Mar 2019 21:21:21 +0100 Subject: [PATCH] Platform: add a test for Sdl2Application::setContainerCssClass(). --- src/Magnum/Platform/Test/Sdl2ApplicationTest.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Magnum/Platform/Test/Sdl2ApplicationTest.cpp b/src/Magnum/Platform/Test/Sdl2ApplicationTest.cpp index 70047e24e..701110e95 100644 --- a/src/Magnum/Platform/Test/Sdl2ApplicationTest.cpp +++ b/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 }; }}}}