mirror of
https://github.com/MaSzyna-EU07/StarterNG.git
synced 2026-11-19 06:55:59 +01:00
Rework the depot, warehouse and vehicle base
A consist added to the warehouse gets a name there. The crew type stays through loading a consist. The vehicle base window replaces the texture base. The depot follows consists changed on the scenarios page, also with the warehouse tab left open.
This commit is contained in:
@@ -80,28 +80,23 @@ public sealed class TextureRandomizerDialog
|
||||
revDiff.IsCheckedChanged += (_, _) => age.IsEnabled = revDiff.IsChecked == true;
|
||||
vsYear.IsCheckedChanged += (_, _) => year.IsEnabled = vsYear.IsChecked == true;
|
||||
|
||||
var win = new Window
|
||||
{
|
||||
Title = App.Loc["RandomizeTexturesTitle"],
|
||||
Width = 420,
|
||||
SizeToContent = SizeToContent.Height,
|
||||
CanResize = false,
|
||||
WindowStartupLocation = WindowStartupLocation.CenterOwner
|
||||
};
|
||||
var win = MessageBox.FixedDialog(App.Loc["RandomizeTexturesTitle"], 420);
|
||||
|
||||
var rulesBtn = new Button
|
||||
{
|
||||
Content = App.Loc["RandomizeTexturesRules"],
|
||||
HorizontalAlignment = HorizontalAlignment.Stretch,
|
||||
HorizontalContentAlignment = HorizontalAlignment.Center,
|
||||
Cursor = _hand
|
||||
};
|
||||
rulesBtn.Classes.Add("Basic");
|
||||
rulesBtn.Classes.Add("Flat");
|
||||
rulesBtn.Click += async (_, _) => await new RulesWindow().ShowDialog(win);
|
||||
|
||||
var ok = new Button
|
||||
{
|
||||
Content = App.Loc["RandomizeTexturesApply"],
|
||||
MinWidth = 90,
|
||||
HorizontalContentAlignment = HorizontalAlignment.Center,
|
||||
Cursor = _hand
|
||||
};
|
||||
ok.Classes.Add("Accent");
|
||||
@@ -114,7 +109,13 @@ public sealed class TextureRandomizerDialog
|
||||
win.Close(true);
|
||||
};
|
||||
|
||||
var cancel = new Button { Content = App.Loc["Cancel"], MinWidth = 90, Cursor = _hand };
|
||||
var cancel = new Button
|
||||
{
|
||||
Content = App.Loc["Cancel"],
|
||||
MinWidth = 90,
|
||||
HorizontalContentAlignment = HorizontalAlignment.Center,
|
||||
Cursor = _hand
|
||||
};
|
||||
cancel.Classes.Add("Flat");
|
||||
cancel.Click += (_, _) => win.Close(false);
|
||||
|
||||
@@ -152,13 +153,7 @@ public sealed class TextureRandomizerDialog
|
||||
},
|
||||
noArch,
|
||||
rulesBtn,
|
||||
new StackPanel
|
||||
{
|
||||
Orientation = Orientation.Horizontal,
|
||||
HorizontalAlignment = HorizontalAlignment.Right,
|
||||
Spacing = 8,
|
||||
Children = { ok, cancel }
|
||||
}
|
||||
MessageBox.ButtonRow(ok, cancel)
|
||||
}
|
||||
};
|
||||
return win;
|
||||
|
||||
Reference in New Issue
Block a user