mirror of
https://gitlab.com/nullmax17/PlombirLauncher.git
synced 2025-03-14 18:01:12 +03:00
Settings overhaul
This commit is contained in:
parent
7a8d262aed
commit
6bd8cab129
Binary file not shown.
Before Width: | Height: | Size: 911 B After Width: | Height: | Size: 1.5 KiB |
@ -19,47 +19,51 @@
|
||||
Background="#353535"
|
||||
>
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel Grid.Row="0" Grid.ColumnSpan="2">
|
||||
<TextBlock
|
||||
HorizontalAlignment="Center"
|
||||
Text="All tweaks can be found in TOML near executable."
|
||||
FontFamily="{StaticResource QuicksandFont}"
|
||||
/>
|
||||
<Window.Background>
|
||||
<ImageBrush Source="/Assets/Sprites/toml-paper.png" Stretch="UniformToFill"/>
|
||||
</Window.Background>
|
||||
|
||||
<StackPanel Margin="5">
|
||||
|
||||
<StackPanel HorizontalAlignment="Center">
|
||||
<TextBlock
|
||||
Text="All tweaks can be found in TOML near executable."
|
||||
FontFamily="{StaticResource QuicksandFont}"
|
||||
/>
|
||||
|
||||
<TextBlock
|
||||
x:Name="tweaksVersion"
|
||||
FontFamily="{StaticResource QuicksandFont}"
|
||||
/>
|
||||
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Margin="20">
|
||||
|
||||
<StackPanel>
|
||||
|
||||
<TextBlock
|
||||
HorizontalAlignment="Center"
|
||||
x:Name="tweaksVersion"
|
||||
x:Name="currentDir"
|
||||
FontFamily="{StaticResource QuicksandFont}"
|
||||
/>
|
||||
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Row="1" Grid.Column="0">
|
||||
|
||||
<Button
|
||||
Margin="5"
|
||||
Content="Select minecraft folder"
|
||||
Click="OnFilePickerClick"
|
||||
HorizontalAlignment="Center"
|
||||
/>
|
||||
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Row="2" Grid.Column="1">
|
||||
<Image Source="/Assets/Sprites/toml-paper.png" Stretch="Uniform" />
|
||||
</StackPanel>
|
||||
|
||||
<!-- <StackPanel Grid.Row="2" Grid.Column="1">
|
||||
<Image Source="/Assets/Sprites/toml-paper.png" Stretch="Uniform" />
|
||||
|
||||
|
||||
</StackPanel>
|
||||
</StackPanel> -->
|
||||
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
|
||||
</Window>
|
||||
|
@ -15,6 +15,7 @@ public partial class SettingsWindow : Window
|
||||
InitializeComponent();
|
||||
_mainWindowVM = mainWindowVM;
|
||||
tweaksVersion.Text = $"Current tweaks version: {_mainWindowVM.TweaksVersion}";
|
||||
currentDir.Text = $"Current saving directory: {_mainWindowVM.RuntimeLocation}";
|
||||
}
|
||||
|
||||
private async void OnFilePickerClick(object sender, RoutedEventArgs args)
|
||||
@ -36,6 +37,7 @@ public partial class SettingsWindow : Window
|
||||
if (location is null) throw new NullReferenceException("Invalid location selected!");
|
||||
_mainWindowVM.RuntimeLocation = location;
|
||||
System.Console.WriteLine($"Selected {_mainWindowVM.RuntimeLocation}.");
|
||||
currentDir.Text = $"Current saving directory: {_mainWindowVM.RuntimeLocation}";
|
||||
ConfigManager.WriteInConfig("runtime-path", location);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user