|
@@ -4,9 +4,11 @@
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
xmlns:titlebars="using:VeloeMinecraftLauncher.Views.TitleBar"
|
|
|
- mc:Ignorable="d" d:DesignWidth="600" d:DesignHeight="300"
|
|
|
- Width="600" Height="300"
|
|
|
- MaxWidth="600" MaxHeight="300"
|
|
|
+ xmlns:dialog="clr-namespace:Egorozh.ColorPicker.Dialog;assembly=Egorozh.ColorPicker.Avalonia.Dialog"
|
|
|
+ xmlns:cp="clr-namespace:Egorozh.ColorPicker;assembly=Egorozh.ColorPicker.Avalonia"
|
|
|
+ mc:Ignorable="d" d:DesignWidth="600" d:DesignHeight="450"
|
|
|
+ Width="600" Height="450"
|
|
|
+ MaxWidth="600" MaxHeight="450"
|
|
|
x:Class="VeloeMinecraftLauncher.Views.SettingsWindow"
|
|
|
Icon="/Assets/avalonia-logo.ico"
|
|
|
Title="Settings"
|
|
@@ -17,6 +19,11 @@
|
|
|
ExtendClientAreaChromeHints="NoChrome"
|
|
|
ExtendClientAreaTitleBarHeightHint="-1">
|
|
|
|
|
|
+ <Window.Styles>
|
|
|
+ <Style Selector="TabItem">
|
|
|
+ <Setter Property="FontSize" Value="16"/>
|
|
|
+ </Style>
|
|
|
+ </Window.Styles>
|
|
|
<Design.DataContext>
|
|
|
<vm:SettingsWindowViewModel/>
|
|
|
</Design.DataContext>
|
|
@@ -25,9 +32,9 @@
|
|
|
<ExperimentalAcrylicBorder.Material>
|
|
|
<ExperimentalAcrylicMaterial
|
|
|
BackgroundSource="Digger"
|
|
|
- TintColor="Black"
|
|
|
+ TintColor="{Binding InterfaceColor}"
|
|
|
TintOpacity="1"
|
|
|
- MaterialOpacity="0.2" />
|
|
|
+ MaterialOpacity="{Binding MaterialOpacity}" />
|
|
|
</ExperimentalAcrylicBorder.Material>
|
|
|
</ExperimentalAcrylicBorder>
|
|
|
<DockPanel>
|
|
@@ -35,45 +42,79 @@
|
|
|
IsSeamless="False"
|
|
|
IsIconVisible="False"
|
|
|
IsMaximizeVisible="False"
|
|
|
- TitleText="Versions"
|
|
|
+ TitleText="Settings"
|
|
|
DockPanel.Dock="Top">
|
|
|
</titlebars:TitleBarWindow>
|
|
|
- <Grid Margin="10 0 10 5" ShowGridLines="false">
|
|
|
- <Grid.RowDefinitions>
|
|
|
- <RowDefinition Height="0" MaxHeight="0"></RowDefinition>
|
|
|
- <RowDefinition Height="*" MaxHeight="35"></RowDefinition>
|
|
|
- <RowDefinition Height="*" MaxHeight="35"></RowDefinition>
|
|
|
- <RowDefinition Height="Auto" MinHeight="35" MaxHeight="65" ></RowDefinition>
|
|
|
- <RowDefinition Height="*" MaxHeight="35"></RowDefinition>
|
|
|
- <RowDefinition Height="*" MaxHeight="35"></RowDefinition>
|
|
|
- <RowDefinition Height="*"></RowDefinition>
|
|
|
- </Grid.RowDefinitions>
|
|
|
- <Grid.ColumnDefinitions>
|
|
|
- <ColumnDefinition Width="250"></ColumnDefinition>
|
|
|
- <ColumnDefinition Width="*"></ColumnDefinition>
|
|
|
- <ColumnDefinition Width="70"></ColumnDefinition>
|
|
|
- </Grid.ColumnDefinitions>
|
|
|
+ <TabControl
|
|
|
+ HorizontalAlignment="Stretch" DockPanel.Dock="Top">
|
|
|
+ <TabItem
|
|
|
+ Header="Game"
|
|
|
+ VerticalContentAlignment="Center">
|
|
|
+ <Grid Margin="10 0 10 5" ShowGridLines="false" RowDefinitions="Auto, Auto, Auto, Auto, Auto, Auto, Auto">
|
|
|
+
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="250"></ColumnDefinition>
|
|
|
+ <ColumnDefinition Width="*"></ColumnDefinition>
|
|
|
+ <ColumnDefinition Width="70"></ColumnDefinition>
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
|
|
|
-
|
|
|
+ <CheckBox Grid.Row="1" Grid.Column="0" IsChecked="true" IsEnabled="False">Set path to minecraft folder</CheckBox>
|
|
|
+ <TextBox Grid.Row="1" Grid.Column="1" Margin="5" Text="{Binding MinecraftFolderPath}" IsEnabled="{Binding SetMinecraftFolder}"></TextBox>
|
|
|
+ <Button Grid.Row="1" Grid.Column="2" Content="Open" Command="{Binding OpenMinecraftPathDialog}" CommandParameter="{Binding $parent[Window]}" HorizontalAlignment="Stretch" HorizontalContentAlignment="Center"></Button>
|
|
|
|
|
|
- <CheckBox Grid.Row="1" Grid.Column="0" IsChecked="true" IsEnabled="False">Set path to minecraft folder</CheckBox>
|
|
|
- <TextBox Grid.Row="1" Grid.Column="1" Margin="5" Text="{Binding MinecraftFolderPath}" IsEnabled="{Binding SetMinecraftFolder}"></TextBox>
|
|
|
- <Button Grid.Row="1" Grid.Column="2" Content="Open" Command="{Binding OpenMinecraftPathDialog}" CommandParameter="{Binding $parent[Window]}" HorizontalAlignment="Stretch" HorizontalContentAlignment="Center"></Button>
|
|
|
+ <CheckBox Grid.Row="2" Grid.Column="0" IsChecked="{Binding UseCustomJava}">Use custom java</CheckBox>
|
|
|
+ <TextBox Grid.Row="2" Grid.Column="1" Margin="5" Text="{Binding JavaPath}" IsEnabled="{Binding UseCustomJava}"></TextBox>
|
|
|
+ <Button Grid.Row="2" Grid.Column="2" Content="Open" Command="{Binding OpenJavaPathDialog}" CommandParameter="{Binding $parent[Window]}" IsEnabled="{Binding UseCustomJava}" HorizontalAlignment="Stretch" HorizontalContentAlignment="Center"></Button>
|
|
|
|
|
|
- <CheckBox Grid.Row="2" Grid.Column="0" IsChecked="{Binding UseCustomJava}">Use custom java</CheckBox>
|
|
|
- <TextBox Grid.Row="2" Grid.Column="1" Margin="5" Text="{Binding JavaPath}" IsEnabled="{Binding UseCustomJava}"></TextBox>
|
|
|
- <Button Grid.Row="2" Grid.Column="2" Content="Open" Command="{Binding OpenJavaPathDialog}" CommandParameter="{Binding $parent[Window]}" IsEnabled="{Binding UseCustomJava}" HorizontalAlignment="Stretch" HorizontalContentAlignment="Center"></Button>
|
|
|
+ <CheckBox Grid.Row="3" Grid.Column="0" IsChecked="{Binding SetMaxRam}">Set max RAM</CheckBox>
|
|
|
+ <TextBox Grid.Row="3" Grid.Column="1" Margin="5" Name="MaxRam" Text="{Binding MaxRam}" IsEnabled="{Binding SetMaxRam}" HorizontalAlignment="Left" VerticalAlignment="Top"></TextBox>
|
|
|
|
|
|
- <CheckBox Grid.Row="3" Grid.Column="0" IsChecked="{Binding SetMaxRam}">Set max RAM</CheckBox>
|
|
|
- <TextBox Grid.Row="3" Grid.Column="1" Margin="5" Name="MaxRam" Text="{Binding MaxRam}" IsEnabled="{Binding SetMaxRam}" HorizontalAlignment="Left" VerticalAlignment="Top"></TextBox>
|
|
|
+ <CheckBox Grid.Row="4" Grid.ColumnSpan="2" IsChecked="{Binding CheckAssets}" IsEnabled="True">Check vanilla game files before start</CheckBox>
|
|
|
+ </Grid>
|
|
|
+ </TabItem>
|
|
|
+ <TabItem
|
|
|
+ Header="Log"
|
|
|
+ VerticalContentAlignment="Center">
|
|
|
+ <Grid Margin="10 0 10 5" ShowGridLines="false" RowDefinitions="Auto, Auto, Auto, Auto, Auto, Auto, Auto">
|
|
|
+
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="250"></ColumnDefinition>
|
|
|
+ <ColumnDefinition Width="*"></ColumnDefinition>
|
|
|
+ <ColumnDefinition Width="70"></ColumnDefinition>
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+
|
|
|
+ <TextBlock Grid.Row="1" Grid.Column="0" VerticalAlignment="Center">Console log event level</TextBlock>
|
|
|
+ <ComboBox Grid.Row="1" Grid.Column="1" Margin="5" Items="{Binding LogEventLevels}" PlaceholderText="Select level" SelectedItem="{Binding ConsoleLogEventLevel}" HorizontalAlignment="Stretch"></ComboBox>
|
|
|
+
|
|
|
+ <TextBlock Grid.Row="2" Grid.Column="0" VerticalAlignment="Center">File log event level</TextBlock>
|
|
|
+ <ComboBox Grid.Row="2" Grid.Column="1" Margin="5" Items="{Binding LogEventLevels}" PlaceholderText="Select level" SelectedItem="{Binding FileLogEventLevel}" HorizontalAlignment="Stretch"></ComboBox>
|
|
|
+
|
|
|
+ <CheckBox Grid.Row="3" Grid.Column="0" IsChecked="{Binding SetMaxLog}">Set max log size</CheckBox>
|
|
|
+ <TextBox Grid.Row="3" Grid.Column="1" Margin="5" Name="MaxLog" Text="{Binding MaxLog}" IsEnabled="{Binding SetMaxLog}" HorizontalAlignment="Left" VerticalAlignment="Top"></TextBox>
|
|
|
|
|
|
- <CheckBox Grid.Row="4" Grid.Column="0" IsChecked="{Binding CheckAssets}" IsEnabled="True">Check game assets before start</CheckBox>
|
|
|
- <CheckBox Grid.Row="5" Grid.ColumnSpan="2" IsChecked="{Binding GameLogToLauncher}">Show game log in launcher (performace issues)</CheckBox>
|
|
|
+ <CheckBox Grid.Row="4" Grid.ColumnSpan="2" IsChecked="{Binding GameLogToLauncher}">Show game log in launcher (performace issues)</CheckBox>
|
|
|
+ </Grid>
|
|
|
+ </TabItem>
|
|
|
+ <TabItem
|
|
|
+ Header="Interface"
|
|
|
+ VerticalContentAlignment="Center">
|
|
|
+ <Grid Margin="10 0 10 5" ShowGridLines="false" RowDefinitions="Auto, Auto, Auto, Auto, Auto, Auto, Auto">
|
|
|
|
|
|
- <Button Grid.Row="6" Grid.Column="0" Command="{Binding SaveSettings}" IsEnabled="{Binding IsValid}" Content="Save" VerticalAlignment="Top"></Button>
|
|
|
- <TextBlock Grid.Row="6" Grid.Column="2" Text="{Binding LauncherVersion}" HorizontalAlignment="Right" VerticalAlignment="Bottom"></TextBlock>
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="100"></ColumnDefinition>
|
|
|
+ <ColumnDefinition Width="*"></ColumnDefinition>
|
|
|
+ <ColumnDefinition Width="70"></ColumnDefinition>
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <TextBlock Grid.Row="1" Grid.Column="0" VerticalAlignment="Center">Color</TextBlock>
|
|
|
+ <cp:ColorPickerControl Name="ColorPicker" Grid.Row="1" Grid.Column="1" MaxWidth="300" MaxHeight="370" Color="{Binding InterfaceColor}" ></cp:ColorPickerControl>
|
|
|
+
|
|
|
+ <Button Grid.Row="1" Grid.Column="2" Command="{Binding SetColor}" CommandParameter="{Binding $parent[Window]}" Content="Set"></Button>
|
|
|
|
|
|
- </Grid>
|
|
|
+ </Grid>
|
|
|
+ </TabItem>
|
|
|
+ </TabControl>
|
|
|
+ <Button Command="{Binding SaveSettings}" IsEnabled="{Binding IsValid}" Content="Save" VerticalAlignment="Bottom" Margin="10 0 0 10"></Button>
|
|
|
+ <TextBlock Text="{Binding LauncherVersion}" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0 0 10 10"></TextBlock>
|
|
|
</DockPanel>
|
|
|
</Panel>
|
|
|
</Window>
|