diff options
-rw-r--r-- | src/client/gameui.cpp | 2 | ||||
-rw-r--r-- | src/client/gameui.h | 4 | ||||
-rw-r--r-- | src/unittest/test_gameui.cpp | 9 |
3 files changed, 11 insertions, 4 deletions
diff --git a/src/client/gameui.cpp b/src/client/gameui.cpp index 7e0a7ef67..0a0fc2bcf 100644 --- a/src/client/gameui.cpp +++ b/src/client/gameui.cpp @@ -189,8 +189,6 @@ void GameUI::update(const RunStats &stats, Client *client, MapDrawControl *draw_ void GameUI::initFlags() { m_flags = GameUI::Flags(); - m_flags.show_chat = true; - m_flags.show_hud = true; m_flags.show_debug = g_settings->getBool("show_debug"); } diff --git a/src/client/gameui.h b/src/client/gameui.h index 04946084e..b6b54562a 100644 --- a/src/client/gameui.h +++ b/src/client/gameui.h @@ -54,9 +54,9 @@ public: { bool show_chat = true; bool show_hud = true; - bool show_minimap = true; + bool show_minimap = false; bool show_debug = true; - bool show_profiler_graph = true; + bool show_profiler_graph = false; }; void init(); diff --git a/src/unittest/test_gameui.cpp b/src/unittest/test_gameui.cpp index 9bc9d8cf5..d7fb622be 100644 --- a/src/unittest/test_gameui.cpp +++ b/src/unittest/test_gameui.cpp @@ -48,9 +48,18 @@ void TestGameUI::runTests(IGameDef *gamedef) void TestGameUI::testInit() { GameUI gui{}; + // Ensure flags on GameUI init + UASSERT(gui.getFlags().show_chat) + UASSERT(gui.getFlags().show_hud) + UASSERT(!gui.getFlags().show_minimap) + UASSERT(!gui.getFlags().show_profiler_graph) + + // And after the initFlags init stage gui.initFlags(); UASSERT(gui.getFlags().show_chat) UASSERT(gui.getFlags().show_hud) + UASSERT(!gui.getFlags().show_minimap) + UASSERT(!gui.getFlags().show_profiler_graph) // @TODO verify if we can create non UI nulldevice to test this function // gui.init(); |