mirror of
https://github.com/MaSzyna-EU07/StarterNG.git
synced 2026-11-05 13:24:51 +01:00
Add hide-archival, last-scenery, HDR tone map and external-change settings
#13 HideArchivalVehicles; #19 LastScenery; HDR tonemap + framebuffer fidelity; reload eu07.ini when it changes on disk; dump missing-vehicle log on exit.
This commit is contained in:
@@ -130,6 +130,13 @@
|
||||
<ComboBoxItem Content="{Binding [REExperimental], Source={x:Static starterNg:App.Loc}}" />
|
||||
</ComboBox>
|
||||
</StackPanel>
|
||||
<StackPanel Spacing="8" Orientation="Horizontal">
|
||||
<Label VerticalAlignment="Center" FontSize="14" Content="{Binding [HdrToneMap], Source={x:Static starterNg:App.Loc}}" />
|
||||
<ComboBox x:Name="HdrToneMapCb" MinWidth="150" MaxWidth="150" SelectedIndex="0">
|
||||
<ComboBoxItem Content="Reinhard" />
|
||||
<ComboBoxItem Content="ACES Film" />
|
||||
</ComboBox>
|
||||
</StackPanel>
|
||||
<StackPanel Spacing="8" Orientation="Horizontal">
|
||||
<Label VerticalAlignment="Center" FontSize="14" Content="{Binding [Resolution], Source={x:Static starterNg:App.Loc}}" />
|
||||
<ComboBox x:Name="ResolutionCb" MinWidth="150" MaxWidth="150" SelectedIndex="0">
|
||||
@@ -367,6 +374,7 @@
|
||||
<CheckBox x:Name="AutoCloseStarterCb" Content="{Binding [AutoCloseStarter], Source={x:Static starterNg:App.Loc}}" />
|
||||
<CheckBox x:Name="LargeThumbnailsCb" Content="{Binding [LargeThumbnails], Source={x:Static starterNg:App.Loc}}" />
|
||||
<CheckBox x:Name="AutoExpandTreeCb" Content="{Binding [AutoExpandSceneryTree], Source={x:Static starterNg:App.Loc}}" />
|
||||
<CheckBox x:Name="HideArchivalVehiclesCb" Content="{Binding [HideArchivalVehicles], Source={x:Static starterNg:App.Loc}}" />
|
||||
<StackPanel Spacing="8" Orientation="Horizontal">
|
||||
<TextBlock VerticalAlignment="Center" Text="{Binding [BatteryDefault], Source={x:Static starterNg:App.Loc}}" />
|
||||
<ComboBox x:Name="BatteryDefaultCb" MinWidth="220" SelectedIndex="0">
|
||||
|
||||
@@ -131,6 +131,8 @@ public partial class Settings : UserControl
|
||||
}
|
||||
|
||||
// ── Settings instance → controls ──────────────────────────────────────
|
||||
public void ReloadFromSettings() => ApplyToUi();
|
||||
|
||||
private void ApplyToUi()
|
||||
{
|
||||
var s = StarterNG.Classes.Settings.Instance;
|
||||
@@ -175,6 +177,7 @@ public partial class Settings : UserControl
|
||||
|
||||
// Graphics
|
||||
RenderEngineCb.SelectedIndex = s.RenderEngine;
|
||||
HdrToneMapCb.SelectedIndex = Clamp(s.HdrToneMap, 0, 1);
|
||||
SelectResolution(s.Width, s.Height);
|
||||
bufferScale.Value = s.BufferScalePercent;
|
||||
textureResolutionSlider.Value = Log2(s.MaxTextureSize, 12);
|
||||
@@ -246,6 +249,7 @@ public partial class Settings : UserControl
|
||||
AutoCloseStarterCb.IsChecked = s.AutoCloseStarter;
|
||||
LargeThumbnailsCb.IsChecked = s.LargeThumbnails;
|
||||
AutoExpandTreeCb.IsChecked = s.AutoExpandSceneryTree;
|
||||
HideArchivalVehiclesCb.IsChecked = s.HideArchivalVehicles;
|
||||
BatteryDefaultCb.SelectedIndex = (int)s.BatteryDefault;
|
||||
}
|
||||
finally
|
||||
@@ -293,6 +297,7 @@ public partial class Settings : UserControl
|
||||
|
||||
// Graphics
|
||||
s.RenderEngine = Math.Max(0, RenderEngineCb.SelectedIndex);
|
||||
s.HdrToneMap = Clamp(HdrToneMapCb.SelectedIndex, 0, 1);
|
||||
ReadResolution(s);
|
||||
s.BufferScalePercent = (int)bufferScale.Value;
|
||||
s.MaxTextureSize = 1 << (int)textureResolutionSlider.Value;
|
||||
@@ -364,6 +369,7 @@ public partial class Settings : UserControl
|
||||
s.AutoCloseStarter = IsChecked(AutoCloseStarterCb);
|
||||
s.LargeThumbnails = IsChecked(LargeThumbnailsCb);
|
||||
s.AutoExpandSceneryTree = IsChecked(AutoExpandTreeCb);
|
||||
s.HideArchivalVehicles = IsChecked(HideArchivalVehiclesCb);
|
||||
s.BatteryDefault = (BatteryDefault)Math.Max(0, BatteryDefaultCb.SelectedIndex);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user