Add config flag to persist GUI visibility state at samuncle's request

This commit is contained in:
auria.mg
2017-02-20 19:14:33 -05:00
parent 668e10d8ca
commit eb9f656b44
3 changed files with 11 additions and 0 deletions

View File

@@ -926,6 +926,10 @@ namespace UserConfigParams
PARAM_DEFAULT( BoolUserConfigParam(false, "artist_debug_mode",
"Whether to enable track debugging features") );
PARAM_PREFIX BoolUserConfigParam m_hide_gui
PARAM_DEFAULT(BoolUserConfigParam(false, "debug_hide_gui",
"Whether to hide the GUI (artist debug mode)"));
PARAM_PREFIX BoolUserConfigParam m_everything_unlocked
PARAM_DEFAULT( BoolUserConfigParam(false, "everything_unlocked",
"Enable all karts and tracks") );

View File

@@ -65,6 +65,9 @@ RaceGUI::RaceGUI()
{
m_enabled = true;
if (UserConfigParams::m_artist_debug_mode && UserConfigParams::m_hide_gui)
m_enabled = false;
// Determine maximum length of the rank/lap text, in order to
// align those texts properly on the right side of the viewport.
gui::ScalableFont* font = GUIEngine::getHighresDigitFont();

View File

@@ -73,6 +73,10 @@ const int COMPLETED_HARD = 4;
RaceGUIOverworld::RaceGUIOverworld()
{
m_enabled = true;
if (UserConfigParams::m_artist_debug_mode && UserConfigParams::m_hide_gui)
m_enabled = false;
m_is_first_render_call = true;
m_close_to_a_challenge = false;
m_current_challenge = NULL;