diff --git a/Globals.cpp b/Globals.cpp index fee1d26d..56ec7a4c 100644 --- a/Globals.cpp +++ b/Globals.cpp @@ -738,6 +738,10 @@ global_settings::ConfigParse(cParser &Parser) { Parser.getTokens( 1 ); Parser >> captureonstart; } + else if (token == "gui.defaultwindows") { + Parser.getTokens(1); + Parser >> gui_defaultwindows; + } else if (token == "gfx.framebuffer.width") { Parser.getTokens(1, false); diff --git a/Globals.h b/Globals.h index cc8e19cb..bbd80a27 100644 --- a/Globals.h +++ b/Globals.h @@ -189,6 +189,7 @@ struct global_settings { bool captureonstart = true; bool render_cab = true; bool crash_damage = true; + bool gui_defaultwindows = true; #ifdef USE_EXTCAM_CAMERA std::string extcam_cmd; diff --git a/driveruilayer.cpp b/driveruilayer.cpp index 85d7e30c..9f94c70e 100644 --- a/driveruilayer.cpp +++ b/driveruilayer.cpp @@ -50,6 +50,11 @@ driver_ui::driver_ui() { m_transcriptspanel.title = STR("Transcripts"); m_transcriptspanel.size_min = { 435, 85 }; m_transcriptspanel.size_max = { Global.iWindowWidth * 0.95, Global.iWindowHeight * 0.95 }; + + if (Global.gui_defaultwindows) { + m_aidpanel.is_open = true; + m_scenariopanel.is_open = true; + } } void driver_ui::render_menu_contents() { @@ -58,6 +63,7 @@ void driver_ui::render_menu_contents() { if (ImGui::BeginMenu(STR_C("Mode windows"))) { ImGui::MenuItem(m_aidpanel.title.c_str(), "F1", &m_aidpanel.is_open); + ImGui::MenuItem(m_scenariopanel.title.c_str(), "F1", &m_aidpanel.is_open); ImGui::MenuItem(STR_C("Timetable"), "F2", &m_timetablepanel.is_open); ImGui::MenuItem(m_debugpanel.name().c_str(), "F12", &m_debugpanel.is_open); ImGui::MenuItem(m_mappanel.name().c_str(), "Tab", &m_mappanel.is_open); diff --git a/driveruilayer.h b/driveruilayer.h index 6be4f620..5975eb0c 100644 --- a/driveruilayer.h +++ b/driveruilayer.h @@ -57,8 +57,8 @@ private: render_() override; // members - drivingaid_panel m_aidpanel { "Driving Aid", true }; - scenario_panel m_scenariopanel { "Scenario", true }; + drivingaid_panel m_aidpanel { "Driving Aid", false }; + scenario_panel m_scenariopanel { "Scenario", false }; timetable_panel m_timetablepanel { "Timetable", false }; debug_panel m_debugpanel { "Debug Data", false }; transcripts_panel m_transcriptspanel { "Transcripts", true }; // voice transcripts