diff --git a/engine/core/include/engine.hpp b/engine/core/include/engine.hpp index 604fe11..8e4b6d5 100755 --- a/engine/core/include/engine.hpp +++ b/engine/core/include/engine.hpp @@ -302,6 +302,7 @@ namespace prism { #endif bool console_enabled = true; + bool ui_enabled = true; private: void setup_scene(Scene& scene); diff --git a/engine/core/src/engine.cpp b/engine/core/src/engine.cpp index f05a242..fc6280d 100755 --- a/engine/core/src/engine.cpp +++ b/engine/core/src/engine.cpp @@ -449,6 +449,9 @@ void engine::process_key_down(const unsigned int keyCode) { if(keyCode == platform::get_keycode(InputButton::C)) console_enabled = !console_enabled; + + if(keyCode == platform::get_keycode(InputButton::Backspace)) + ui_enabled = !ui_enabled; } void engine::process_key_up(const unsigned int keyCode) { @@ -620,12 +623,14 @@ void engine::update_animation(const Animation& anim, const float time) { void engine::begin_frame(const float delta_time) { imgui->begin_frame(delta_time); - - if(debug_enabled) - draw_debug_ui(); - if(console_enabled) - draw_console(); + if(ui_enabled) { + if (debug_enabled) + draw_debug_ui(); + + if (console_enabled) + draw_console(); + } if(current_app != nullptr) current_app->begin_frame();