mirror of
https://github.com/MaSzyna-EU07/StarterNG.git
synced 2026-11-19 15:02:15 +01:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user