mirror of
https://github.com/MaSzyna-EU07/StarterNG.git
synced 2026-11-27 17:09:37 +01:00
The settings keep only the keys master reads, Vulkan left out. The standard mode is the old starter's panel; the advanced mode opens behind a warning whose yes takes a click only after 20 seconds in front of the player. - Sliders go by fixed steps (SliderRanges), held to the standard ranges there: fpslimit up to 240, sleeperdistance up to 1000 m. - On the first start everyone is moved to the standard mode once: what is outside it goes back to its default, the sliders' values to their ranges, and a copy of eu07.ini is kept as eu07.ini.before-standard. - "Restore defaults" puts every setting back, the language, the simulator, the UART port and the control keys kept. - Monitors and renderers are found anew (Monitors, Renderers), Displays and SettingReach gone. - mousescale writes its second number as the old starter did, 0.5 or -0.5 for an inverted vertical axis; an axis that would not move gets the default. - Depot, in the standard mode: no AI or drivable-only filters, empty consists not listed, the crew shown but not changed. - Randomizing the textures of a whole scenery no longer rebuilds the view per consist, and finds its candidates by mini, so the window keeps answering. - A long operator in the vehicle list is cut short instead of over the name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
47 lines
1.8 KiB
C#
47 lines
1.8 KiB
C#
using System;
|
|
using System.Globalization;
|
|
using StarterNG.Domain.Settings;
|
|
|
|
namespace StarterNG.Views;
|
|
|
|
/// <summary>The captions of the settings' rows and the words for their values.</summary>
|
|
internal static class SettingTexts
|
|
{
|
|
public static string[] QualityWords => new[]
|
|
{
|
|
App.Loc["QualityVeryLow"], App.Loc["QualityLow"], App.Loc["QualityNormal"],
|
|
App.Loc["QualityHigh"], App.Loc["QualityVeryHigh"]
|
|
};
|
|
|
|
/// <summary>The words of a slider that goes from 1 to 4, which has no middle.</summary>
|
|
public static string Fidelity(int level)
|
|
{
|
|
var q = QualityWords;
|
|
string[] four = { q[0], q[1], q[3], q[4] };
|
|
return four[Math.Clamp(level, 1, 4) - 1];
|
|
}
|
|
|
|
public static string Anisotropy(double value) => "x" + value.ToString("0.#", CultureInfo.CurrentCulture);
|
|
|
|
public static string AntiAliasing(AntiAliasingMode mode) => mode switch
|
|
{
|
|
AntiAliasingMode.Msaa2 => "MSAA x2",
|
|
AntiAliasingMode.Msaa4 => "MSAA x4",
|
|
AntiAliasingMode.Msaa8 => "MSAA x8",
|
|
_ => App.Loc["MsaaNone"]
|
|
};
|
|
|
|
public static string TwoDecimals(double value) => value.ToString("0.00", CultureInfo.CurrentCulture);
|
|
|
|
/// <summary>A rate below one a second reads better as the time between updates.</summary>
|
|
public static string ReflectionsInterval(double perSecond)
|
|
{
|
|
if (perSecond >= 1)
|
|
return string.Format(App.Loc["TimesPerSecond"], perSecond.ToString("0.##", CultureInfo.CurrentCulture));
|
|
double seconds = 1 / perSecond;
|
|
return seconds >= 60
|
|
? string.Format(App.Loc["EveryMinutes"], (seconds / 60).ToString("0.#", CultureInfo.CurrentCulture))
|
|
: string.Format(App.Loc["EverySeconds"], seconds.ToString("0.#", CultureInfo.CurrentCulture));
|
|
}
|
|
}
|