diff options
author | LaG1924 <lag1924@gmail.com> | 2021-07-04 14:26:14 +0200 |
---|---|---|
committer | LaG1924 <lag1924@gmail.com> | 2021-07-04 14:26:14 +0200 |
commit | 8ee59be130a72645a36527f8e718c5a251a371f8 (patch) | |
tree | e556e78d18559f1de2975cf74de3d930fb51ac39 | |
parent | Added basic Chat (diff) | |
download | AltCraft-8ee59be130a72645a36527f8e718c5a251a371f8.tar AltCraft-8ee59be130a72645a36527f8e718c5a251a371f8.tar.gz AltCraft-8ee59be130a72645a36527f8e718c5a251a371f8.tar.bz2 AltCraft-8ee59be130a72645a36527f8e718c5a251a371f8.tar.lz AltCraft-8ee59be130a72645a36527f8e718c5a251a371f8.tar.xz AltCraft-8ee59be130a72645a36527f8e718c5a251a371f8.tar.zst AltCraft-8ee59be130a72645a36527f8e718c5a251a371f8.zip |
-rw-r--r-- | src/Render.cpp | 7 | ||||
-rw-r--r-- | src/Render.hpp | 1 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/Render.cpp b/src/Render.cpp index 3bf1e6b..896a05f 100644 --- a/src/Render.cpp +++ b/src/Render.cpp @@ -292,6 +292,10 @@ void Render::HandleEvents() { break; } + case SDL_SCANCODE_F4: + hideRml = !hideRml; + break; + case SDL_SCANCODE_F8: Rml::Debugger::SetVisible(!Rml::Debugger::IsVisible()); break; @@ -430,7 +434,8 @@ void Render::Update() { void Render::RenderGui() { OPTICK_EVENT(); - rmlContext->Render(); + if (!hideRml) + rmlContext->Render(); } void Render::InitEvents() { diff --git a/src/Render.hpp b/src/Render.hpp index b8963c7..9a9feee 100644 --- a/src/Render.hpp +++ b/src/Render.hpp @@ -44,6 +44,7 @@ class Render { std::unique_ptr<RmlFileInterface> rmlFile; Rml::Context* rmlContext; unsigned short sdlKeyMods = 0; + bool hideRml = false; void SetMouseCapture(bool IsCaptured); |