mirror of
https://github.com/MaSzyna-EU07/StarterNG.git
synced 2026-11-19 15:02:15 +01:00
Start the scenery editor from its own button and note launches
With no scenery selected the button starts a new one in the editor. Each launch notes the scenery, the timetable number and the vehicles for the tapes. Tools work on the selected scenery, and an emptied consist stays listed.
This commit is contained in:
@@ -4,9 +4,13 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:starterNg="clr-namespace:StarterNG"
|
||||
xmlns:infra="clr-namespace:StarterNG.Infrastructure"
|
||||
xmlns:materialIcons="clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="StarterNG.Views.Scenarios"
|
||||
x:CompileBindings="True">
|
||||
<UserControl.Resources>
|
||||
<SolidColorBrush x:Key="SyntaxFaultBrush" Color="#E0A030" />
|
||||
</UserControl.Resources>
|
||||
<Grid Name="scenariosGrid" Margin="0" ColumnSpacing="0" RowSpacing="3">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" MinWidth="200" MaxWidth="460" />
|
||||
@@ -72,7 +76,7 @@
|
||||
<GridSplitter Grid.Row="1" Height="4" HorizontalAlignment="Stretch"
|
||||
Background="Transparent" ResizeDirection="Rows" />
|
||||
|
||||
<TabControl Grid.Row="2">
|
||||
<TabControl Grid.Row="2" Name="infoTabs">
|
||||
<TabItem Header="{Binding [TabDescription], Source={x:Static starterNg:App.Loc}}">
|
||||
<Grid RowDefinitions="2*,6,*" Margin="4">
|
||||
<Grid Grid.Row="0" ColumnDefinitions="*,3,225">
|
||||
@@ -98,7 +102,7 @@
|
||||
<TabItem Header="{Binding [Weather], Source={x:Static starterNg:App.Loc}}">
|
||||
<StackPanel Name="weatherForm" Margin="8,6" Spacing="8" IsEnabled="False">
|
||||
<Grid ColumnDefinitions="Auto,12,380,8,70"
|
||||
RowDefinitions="Auto,6,Auto,14,Auto,Auto,8,Auto,Auto,14,Auto,14,Auto">
|
||||
RowDefinitions="Auto,6,Auto,14,Auto,Auto,8,Auto,Auto,10,Auto,10,Auto">
|
||||
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" VerticalAlignment="Center"
|
||||
Foreground="{StaticResource CarbonFgDim}"
|
||||
@@ -108,7 +112,7 @@
|
||||
YearVisible="False" MinWidth="0"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Stretch"
|
||||
SelectedDateChanged="WeatherDate_OnChanged" />
|
||||
<ComboBox Grid.Column="2" Name="weatherSeason"
|
||||
<ComboBox Grid.Column="2" Name="weatherSeason" Classes="Localized"
|
||||
HorizontalAlignment="Stretch" VerticalAlignment="Center"
|
||||
SelectionChanged="WeatherSeason_OnChanged">
|
||||
<ComboBoxItem Tag="0" Content="{Binding [SeasonNow], Source={x:Static starterNg:App.Loc}}" />
|
||||
@@ -176,7 +180,7 @@
|
||||
<TextBlock Grid.Row="10" Grid.Column="0" VerticalAlignment="Center"
|
||||
Foreground="{StaticResource CarbonFgDim}"
|
||||
Text="{Binding [Overcast], Source={x:Static starterNg:App.Loc}}" />
|
||||
<ComboBox Grid.Row="10" Grid.Column="2" Name="weatherOvercast"
|
||||
<ComboBox Grid.Row="10" Grid.Column="2" Name="weatherOvercast" Classes="Localized"
|
||||
HorizontalAlignment="Stretch"
|
||||
SelectionChanged="Weather_OnSelectionChanged">
|
||||
<ComboBoxItem Tag="random" Content="{Binding [OvercastRandom], Source={x:Static starterNg:App.Loc}}" />
|
||||
@@ -217,6 +221,26 @@
|
||||
</ScrollViewer>
|
||||
</DockPanel>
|
||||
</TabItem>
|
||||
<!-- Only for a scenery whose files hold mistakes - see PopulateFaults. -->
|
||||
<TabItem Name="faultsTab" IsVisible="False">
|
||||
<TabItem.Header>
|
||||
<StackPanel Orientation="Horizontal" Spacing="5">
|
||||
<materialIcons:MaterialIcon Kind="AlertOutline" Width="15" Height="15"
|
||||
Foreground="{StaticResource SyntaxFaultBrush}" />
|
||||
<TextBlock Name="faultsTabHeader" VerticalAlignment="Center" />
|
||||
</StackPanel>
|
||||
</TabItem.Header>
|
||||
<DockPanel LastChildFill="True" Margin="4">
|
||||
<TextBlock DockPanel.Dock="Top" TextWrapping="Wrap" Margin="2,0,0,6"
|
||||
Foreground="{StaticResource CarbonFgDim}"
|
||||
Text="{Binding [SyntaxIntro], Source={x:Static starterNg:App.Loc}}" />
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
|
||||
<SelectableTextBlock Name="faultsText"
|
||||
FontFamily="{x:Static infra:MonoFont.Family}"
|
||||
FontSize="12" TextWrapping="NoWrap" />
|
||||
</ScrollViewer>
|
||||
</DockPanel>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</Grid>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user