mirror of
https://gitlab.com/nullmax17/PlombirLauncher.git
synced 2025-03-14 18:01:12 +03:00
UI update for better session control support
This commit is contained in:
parent
d1c235c1b5
commit
1e725f5933
@ -6,7 +6,7 @@
|
||||
mc:Ignorable="d" d:DesignWidth="750" d:DesignHeight="500"
|
||||
x:Class="LauncherGUI.Views.MainWindow"
|
||||
x:DataType="vm:MainWindowViewModel"
|
||||
Icon="/Assets/icon.png"
|
||||
Icon="/Assets/Sprites/icon.png"
|
||||
Title="PlombirLauncher"
|
||||
RequestedThemeVariant="Dark"
|
||||
Width="750" Height="500"
|
||||
@ -14,15 +14,9 @@
|
||||
MaxWidth="750" MaxHeight="500">
|
||||
|
||||
<Window.Background>
|
||||
<ImageBrush Source="/Assets/background.jpg" Stretch="UniformToFill"/>
|
||||
<ImageBrush Source="/Assets/Sprites/background.jpg" Stretch="UniformToFill"/>
|
||||
</Window.Background>
|
||||
|
||||
<Design.DataContext>
|
||||
<!-- This only sets the DataContext for the previewer in an IDE,
|
||||
to set the actual DataContext for runtime, set the DataContext property in code (look at App.axaml.cs) -->
|
||||
<vm:MainWindowViewModel/>
|
||||
</Design.DataContext>
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="50"/>
|
||||
@ -33,7 +27,7 @@
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
|
||||
<!-- Title area -->
|
||||
<StackPanel
|
||||
HorizontalAlignment="Center"
|
||||
Grid.Row="0" Grid.ColumnSpan="3" >
|
||||
@ -43,13 +37,15 @@
|
||||
Padding="10" Margin="3"
|
||||
CornerRadius="10">
|
||||
|
||||
<Image Source="/Assets/title.png"
|
||||
<Image Source="/Assets/Sprites/title.png"
|
||||
Stretch="Uniform"/>
|
||||
|
||||
</Border>
|
||||
<TextBlock FontFamily="{StaticResource QuicksandFont}"
|
||||
HorizontalAlignment="Right" Text="v1.1.0 - nullmax17"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Settings for launcher -->
|
||||
<Canvas Grid.Row="0" Grid.Column="1">
|
||||
<Border
|
||||
Background="#353535"
|
||||
@ -59,7 +55,7 @@
|
||||
|
||||
<Image
|
||||
Height="60"
|
||||
Source="/Assets/cog.png"
|
||||
Source="/Assets/Sprites/cog.png"
|
||||
Stretch="Uniform"
|
||||
PointerPressed="OnCogPressed" />
|
||||
|
||||
@ -67,54 +63,85 @@
|
||||
|
||||
</Canvas>
|
||||
|
||||
<!-- Title area end -->
|
||||
|
||||
|
||||
|
||||
<!-- Center-left stack panel with minecraft stuff -->
|
||||
<StackPanel
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center"
|
||||
Grid.Row="1" Grid.Column="0">
|
||||
|
||||
<!-- Session managment -->
|
||||
<Border
|
||||
Background="#353535"
|
||||
HorizontalAlignment="Center"
|
||||
Width="150"
|
||||
CornerRadius="10"
|
||||
Padding="15">
|
||||
|
||||
<Button FontFamily="{StaticResource QuicksandFont}" Content="Launch MC" Click="OnLaunchMinecraftClick" HorizontalAlignment="Center"/>
|
||||
|
||||
</Border>
|
||||
|
||||
<Border
|
||||
Background="#353535"
|
||||
HorizontalAlignment="Center"
|
||||
Width="250"
|
||||
CornerRadius="10"
|
||||
Padding="15" Margin="15">
|
||||
<StackPanel>
|
||||
<!-- <StackPanel>
|
||||
<TextBlock
|
||||
HorizontalAlignment="Center"
|
||||
Text="Insert username:"
|
||||
FontFamily="{StaticResource QuicksandFont}"/>
|
||||
<TextBox Margin="5" Text="{Binding Usernick, Mode=TwoWay}" Width="200" />
|
||||
|
||||
</StackPanel>
|
||||
</StackPanel> -->
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="50"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button
|
||||
Grid.ColumnSpan="2"
|
||||
FontFamily="{StaticResource QuicksandFont}"
|
||||
Content="Launch MC"
|
||||
Click="OnLaunchMinecraftClick"
|
||||
HorizontalAlignment="Center"/>
|
||||
|
||||
|
||||
<Button
|
||||
Grid.Column="1"
|
||||
Grid.Row="1"
|
||||
FontFamily="{StaticResource QuicksandFont}"
|
||||
Content="Choose version"
|
||||
Click="OnChooseVersionClick"
|
||||
HorizontalAlignment="Center"/>
|
||||
|
||||
<Image
|
||||
Height="60"
|
||||
Width="60"
|
||||
Grid.Column="0"
|
||||
Grid.Row="1"
|
||||
Source="/Assets/Sprites/account-logo.png"
|
||||
Stretch="Uniform"
|
||||
PointerPressed="OnAccountSettingsPressed" />
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
</Border>
|
||||
|
||||
<Border
|
||||
|
||||
<!-- Version selection -->
|
||||
<!-- <Border
|
||||
Background="#353535"
|
||||
HorizontalAlignment="Center"
|
||||
Width="150"
|
||||
CornerRadius="10"
|
||||
Padding="10">
|
||||
|
||||
<Button
|
||||
FontFamily="{StaticResource QuicksandFont}"
|
||||
Content="Choose version"
|
||||
Click="OnChooseVersionClick"
|
||||
HorizontalAlignment="Center"/>
|
||||
</Border>
|
||||
|
||||
</Border> -->
|
||||
</StackPanel>
|
||||
|
||||
<!-- Minecraft area end -->
|
||||
|
||||
<!-- Instruction panel in center-right -->
|
||||
<StackPanel Height="300" Grid.Row="1" Grid.Column="2">
|
||||
<Border
|
||||
Background="#353535"
|
||||
@ -136,7 +163,7 @@
|
||||
<Canvas>
|
||||
<Image
|
||||
Height="60"
|
||||
Source="/Assets/gitlab-logo.png"
|
||||
Source="/Assets/Sprites/gitlab-logo.png"
|
||||
Stretch="Uniform"
|
||||
PointerPressed="OnGitlabPressed"
|
||||
Canvas.Left="290"
|
||||
@ -144,6 +171,8 @@
|
||||
</Canvas>
|
||||
|
||||
</StackPanel>
|
||||
<!-- Instruction panel end -->
|
||||
|
||||
</Grid>
|
||||
|
||||
</Window>
|
||||
|
@ -1,11 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Interactivity;
|
||||
using Avalonia.VisualTree;
|
||||
using Plombir;
|
||||
using CmlLib.Core.VersionMetadata;
|
||||
using LauncherGUI.ViewModels;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.InteropServices;
|
||||
@ -86,4 +83,9 @@ public partial class MainWindow : Window
|
||||
}
|
||||
}
|
||||
|
||||
private void OnAccountSettingsPressed(object sender, RoutedEventArgs e)
|
||||
{
|
||||
//todo: account managment window
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user