diff --git a/README.md b/README.md index 51946ed..22a8993 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,7 @@ Use mouse to look. | `F2` | Hide GUI | | `F3` | Toggle debug menu | | `F5` | Reload assets / shaders | +| `F11` | Toggle Fullscreen | The FreeCamâ„¢ mode uses WASD movement and the scrolling to change speed. diff --git a/src/Game.cpp b/src/Game.cpp index d762ae9..b39458c 100644 --- a/src/Game.cpp +++ b/src/Game.cpp @@ -250,6 +250,16 @@ void Game::processInput_() { if (input->isKeyPress(GLFW_KEY_F2)) { ui->setHidden(!ui->hidden()); } + + if (input->isKeyPress(GLFW_KEY_F11)) { + if (glfwGetWindowAttrib(window, GLFW_DECORATED) == GLFW_TRUE) { + glfwSetWindowAttrib(window, GLFW_DECORATED, GLFW_FALSE); + glfwMaximizeWindow(window); + } else { + glfwRestoreWindow(window); + glfwSetWindowAttrib(window, GLFW_DECORATED, GLFW_TRUE); + } + } } void Game::update_() {