From 9d981cb0932c372074eaba25d5c917acbacc25d8 Mon Sep 17 00:00:00 2001 From: maj00r Date: Sun, 4 Oct 2026 12:18:36 +0200 Subject: [PATCH] Add a developer tab with the state of the vehicle database --- .../Domain/Settings/SimulatorSettings.cs | 1 + .../Settings/SettingsSerializer.cs | 2 + StarterNG/MainWindow.axaml | 5 ++ StarterNG/MainWindow.axaml.cs | 26 ++++++- StarterNG/Views/Developer.axaml | 65 ++++++++++++++++ StarterNG/Views/Developer.axaml.cs | 78 +++++++++++++++++++ StarterNG/Views/Settings.axaml | 3 + StarterNG/Views/Settings.axaml.cs | 19 +++++ StarterNG/startercfg/lang/cz.xml | 18 +++++ StarterNG/startercfg/lang/en.xml | 19 +++++ StarterNG/startercfg/lang/hu.xml | 18 +++++ StarterNG/startercfg/lang/pl.xml | 19 +++++ StarterNG/startercfg/lang/ru.xml | 18 +++++ 13 files changed, 289 insertions(+), 2 deletions(-) create mode 100644 StarterNG/Views/Developer.axaml create mode 100644 StarterNG/Views/Developer.axaml.cs diff --git a/StarterNG/Domain/Settings/SimulatorSettings.cs b/StarterNG/Domain/Settings/SimulatorSettings.cs index a93169e..e1dea3c 100644 --- a/StarterNG/Domain/Settings/SimulatorSettings.cs +++ b/StarterNG/Domain/Settings/SimulatorSettings.cs @@ -35,6 +35,7 @@ public sealed class SimulatorSettings public bool DebugMode; public bool VirtualShunting = true; public bool LogMissingVehicleFiles; + public bool DeveloperTools; public int RenderEngine; public int Width = 1280; diff --git a/StarterNG/Infrastructure/Settings/SettingsSerializer.cs b/StarterNG/Infrastructure/Settings/SettingsSerializer.cs index 498a50f..79260d8 100644 --- a/StarterNG/Infrastructure/Settings/SettingsSerializer.cs +++ b/StarterNG/Infrastructure/Settings/SettingsSerializer.cs @@ -56,6 +56,7 @@ public sealed class SettingsSerializer s.DebugMode = c.GetBool("debugmode", false); s.VirtualShunting = c.GetBool("ai.trainman", true); s.LogMissingVehicleFiles = c.GetBool("starter.logmissingvehicles", false); + s.DeveloperTools = c.GetBool("starter.developertools", false); s.RenderEngine = IndexOf(SimulatorSettings.RenderEngines, c.GetString("gfxrenderer", "full"), 0); s.Width = c.GetInt("width", 1280); @@ -195,6 +196,7 @@ public sealed class SettingsSerializer c.SetBool("debugmode", s.DebugMode); c.SetBool("ai.trainman", s.VirtualShunting); c.SetBool("starter.logmissingvehicles", s.LogMissingVehicleFiles); + c.SetBool("starter.developertools", s.DeveloperTools); c.Set("gfxrenderer", SimulatorSettings.RenderEngines[Clamp(s.RenderEngine, 0, SimulatorSettings.RenderEngines.Length - 1)]); c.SetInt("width", s.Width); diff --git a/StarterNG/MainWindow.axaml b/StarterNG/MainWindow.axaml index 9d2b8bc..c631bd1 100644 --- a/StarterNG/MainWindow.axaml +++ b/StarterNG/MainWindow.axaml @@ -37,6 +37,10 @@ Tag="settings" IsCheckedChanged="Nav_OnCheckedChanged" Content="{Binding [NavSettings], Source={x:Static starterNg:App.Loc}}" /> +