142 lines
6.4 KiB
XML
142 lines
6.4 KiB
XML
<Window x:Class="TransportGame.MapViewer.MainWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:prop="http://propertytools.org/wpf"
|
|
Title="MainWindow" Height="500" Width="800">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="2*"/>
|
|
<ColumnDefinition Width="3" />
|
|
<ColumnDefinition Width="200" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<ToolBar Grid.Row="0" Grid.ColumnSpan="3">
|
|
<Button Name="buttonOpen" ToolTip="Open map file" Click="buttonOpen_Click">
|
|
<Image Source="pack://application:,,,/Resources/folder_page.png" />
|
|
</Button>
|
|
<Button Name="buttonSave" ToolTip="Saves as image" Click="buttonSave_Click">
|
|
<Image Source="pack://application:,,,/Resources/picture_save.png" />
|
|
</Button>
|
|
<Separator />
|
|
<TextBlock VerticalAlignment="Center" Margin="4,2,4,2">Zoom:</TextBlock>
|
|
<Slider Name="zoomSlider" Width="80"
|
|
Minimum="1" Maximum="15"
|
|
SmallChange="1" LargeChange="3"
|
|
TickPlacement="BottomRight"
|
|
Ticks="1,2,5,10,15"
|
|
Value="{Binding Renderer.Scale}"
|
|
ValueChanged="zoomSlider_ValueChanged">
|
|
<Slider.ToolTip>
|
|
<ToolTip Content="{Binding RelativeSource={RelativeSource Self}, Path=PlacementTarget.Value}" />
|
|
</Slider.ToolTip>
|
|
</Slider>
|
|
<TextBlock VerticalAlignment="Center">
|
|
<Run Text="{Binding ElementName=zoomSlider, Path=Value}" /><Run>00%</Run>
|
|
</TextBlock>
|
|
</ToolBar>
|
|
|
|
<ScrollViewer Grid.Row="1"
|
|
VerticalScrollBarVisibility="Auto"
|
|
HorizontalScrollBarVisibility="Auto">
|
|
|
|
<Image Stretch="None" Source="{Binding RenderedMap}"/>
|
|
|
|
</ScrollViewer>
|
|
|
|
<StackPanel Grid.Row="1" Name="progress" Visibility="Hidden" Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center">
|
|
<ProgressBar Width="100" Height="10" IsIndeterminate="True"
|
|
Foreground="Tomato" Background="WhiteSmoke" />
|
|
<TextBlock Name="progressText" HorizontalAlignment="Center">Loading...</TextBlock>
|
|
</StackPanel>
|
|
|
|
<GridSplitter Grid.Row="1" Grid.Column="1"
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Stretch" />
|
|
|
|
<StackPanel Grid.Row="1" Grid.Column="2"
|
|
Orientation="Vertical">
|
|
|
|
<Expander IsExpanded="True" Header="Layers">
|
|
<StackPanel Orientation="Vertical">
|
|
<CheckBox>Elevation</CheckBox>
|
|
<CheckBox>Roads</CheckBox>
|
|
<CheckBox>Buildings</CheckBox>
|
|
<CheckBox>Vegetation</CheckBox>
|
|
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition />
|
|
<ColumnDefinition />
|
|
</Grid.ColumnDefinitions>
|
|
<Button Grid.Column="0" Content="Select all" />
|
|
<Button Grid.Column="1" Content="Render" />
|
|
</Grid>
|
|
</StackPanel>
|
|
</Expander>
|
|
<Expander IsExpanded="True" Header="General">
|
|
<Grid Height="Auto">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition />
|
|
<ColumnDefinition />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock Grid.Row="0" Grid.Column="0" >Loaded map:</TextBlock>
|
|
<TextBox Grid.Row="0" Grid.Column="1" IsReadOnly="True" Text="{Binding LoadedFile,Mode=OneWay}" />
|
|
|
|
<TextBlock Grid.Row="1" Grid.Column="0" >Width:</TextBlock>
|
|
<TextBox Grid.Row="1" Grid.Column="1" IsReadOnly="True" Text="{Binding Map.Width,Mode=OneWay}" />
|
|
|
|
<TextBlock Grid.Row="2" Grid.Column="0" >Height:</TextBlock>
|
|
<TextBox Grid.Row="2" Grid.Column="1" IsReadOnly="True" Text="{Binding Map.Height,Mode=OneWay}" />
|
|
|
|
<TextBlock Grid.Row="3" Grid.Column="0" >Water level:</TextBlock>
|
|
<TextBox Grid.Row="3" Grid.Column="1" IsReadOnly="True" Text="{Binding Map.WaterLevel,Mode=OneWay}" />
|
|
</Grid>
|
|
|
|
</Expander>
|
|
|
|
<Expander IsExpanded="True" Header="Biome">
|
|
<Grid Height="Auto">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition />
|
|
<ColumnDefinition />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock Grid.Row="0" Grid.Column="0" >Name:</TextBlock>
|
|
<TextBox Grid.Row="0" Grid.Column="1" IsReadOnly="True" Text="{Binding Map.Biome.Name,Mode=OneWay}" />
|
|
|
|
<TextBlock Grid.Row="1" Grid.Column="0" >Height range:</TextBlock>
|
|
<TextBox Grid.Row="1" Grid.Column="1" IsReadOnly="True" Text="{Binding Map.Biome.HeightRange,Mode=OneWay}" />
|
|
|
|
<TextBlock Grid.Row="2" Grid.Column="0" >Moisture:</TextBlock>
|
|
<TextBox Grid.Row="2" Grid.Column="1" IsReadOnly="True" Text="{Binding Map.Biome.Moisture,Mode=OneWay}" />
|
|
|
|
<TextBlock Grid.Row="3" Grid.Column="0" >Vegetation density:</TextBlock>
|
|
<TextBox Grid.Row="3" Grid.Column="1" IsReadOnly="True" Text="{Binding Map.Biome.VegetationDensity,Mode=OneWay}" />
|
|
</Grid>
|
|
|
|
</Expander>
|
|
|
|
</StackPanel>
|
|
|
|
</Grid>
|
|
</Window>
|