Show bare keys in settings, fix the depot detail tabs

Drops the vehicle counter from the General tab, and the texture tab stops
gluing "label: value" into single lines and uses the same rows as General.
This commit is contained in:
maj00r
2026-09-04 21:41:38 +02:00
parent bce008f0ed
commit 8e87eb8638
8 changed files with 93 additions and 249 deletions

View File

@@ -15,7 +15,6 @@ using Avalonia.Markup.Xaml.Styling;
using Avalonia.Media;
using StarterNG.Classes;
using StarterNG.Controls;
using StarterNG.Infrastructure.Settings;
using StarterNG.Infrastructure;
using StarterNG.Services;
@@ -65,7 +64,6 @@ public partial class Settings : UserControl, ISettingsCapture
AppServices.Current.SettingsStore.RegisterCapture(this);
AnnotateConfigKeys();
PopulateProfileCombo();
ApplyToUi();
@@ -162,19 +160,6 @@ public partial class Settings : UserControl, ISettingsCapture
public void ReloadFromSettings() => ApplyToUi();
/// <summary>
/// Expands each row's eu07.ini key into "key = default (range)", so the line
/// under a setting says what the file holds rather than paraphrasing what the
/// setting does.
/// </summary>
private void AnnotateConfigKeys()
{
// Logical, not visual: the rows exist as soon as the XAML is loaded,
// while categories that are not on screen yet have no visual tree.
foreach (var row in this.GetLogicalDescendants().OfType<SettingRow>())
row.ConfigKey = SettingKeyCatalog.Annotate(row.ConfigKey);
}
private void ApplyToUi()
{
var s = AppServices.Current.Settings;