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"
|
mc:Ignorable="d" d:DesignWidth="750" d:DesignHeight="500"
|
||||||
x:Class="LauncherGUI.Views.MainWindow"
|
x:Class="LauncherGUI.Views.MainWindow"
|
||||||
x:DataType="vm:MainWindowViewModel"
|
x:DataType="vm:MainWindowViewModel"
|
||||||
Icon="/Assets/icon.png"
|
Icon="/Assets/Sprites/icon.png"
|
||||||
Title="PlombirLauncher"
|
Title="PlombirLauncher"
|
||||||
RequestedThemeVariant="Dark"
|
RequestedThemeVariant="Dark"
|
||||||
Width="750" Height="500"
|
Width="750" Height="500"
|
||||||
@ -14,14 +14,8 @@
|
|||||||
MaxWidth="750" MaxHeight="500">
|
MaxWidth="750" MaxHeight="500">
|
||||||
|
|
||||||
<Window.Background>
|
<Window.Background>
|
||||||
<ImageBrush Source="/Assets/background.jpg" Stretch="UniformToFill"/>
|
<ImageBrush Source="/Assets/Sprites/background.jpg" Stretch="UniformToFill"/>
|
||||||
</Window.Background>
|
</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>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
@ -33,7 +27,7 @@
|
|||||||
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<!-- Title area -->
|
||||||
<StackPanel
|
<StackPanel
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
Grid.Row="0" Grid.ColumnSpan="3" >
|
Grid.Row="0" Grid.ColumnSpan="3" >
|
||||||
@ -43,13 +37,15 @@
|
|||||||
Padding="10" Margin="3"
|
Padding="10" Margin="3"
|
||||||
CornerRadius="10">
|
CornerRadius="10">
|
||||||
|
|
||||||
<Image Source="/Assets/title.png"
|
<Image Source="/Assets/Sprites/title.png"
|
||||||
Stretch="Uniform"/>
|
Stretch="Uniform"/>
|
||||||
|
|
||||||
</Border>
|
</Border>
|
||||||
<TextBlock FontFamily="{StaticResource QuicksandFont}"
|
<TextBlock FontFamily="{StaticResource QuicksandFont}"
|
||||||
HorizontalAlignment="Right" Text="v1.1.0 - nullmax17"/>
|
HorizontalAlignment="Right" Text="v1.1.0 - nullmax17"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
|
<!-- Settings for launcher -->
|
||||||
<Canvas Grid.Row="0" Grid.Column="1">
|
<Canvas Grid.Row="0" Grid.Column="1">
|
||||||
<Border
|
<Border
|
||||||
Background="#353535"
|
Background="#353535"
|
||||||
@ -59,62 +55,93 @@
|
|||||||
|
|
||||||
<Image
|
<Image
|
||||||
Height="60"
|
Height="60"
|
||||||
Source="/Assets/cog.png"
|
Source="/Assets/Sprites/cog.png"
|
||||||
Stretch="Uniform"
|
Stretch="Uniform"
|
||||||
PointerPressed="OnCogPressed" />
|
PointerPressed="OnCogPressed" />
|
||||||
|
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
</Canvas>
|
</Canvas>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Title area end -->
|
||||||
|
|
||||||
|
<!-- Center-left stack panel with minecraft stuff -->
|
||||||
<StackPanel
|
<StackPanel
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
Grid.Row="1" Grid.Column="0">
|
Grid.Row="1" Grid.Column="0">
|
||||||
|
|
||||||
|
<!-- Session managment -->
|
||||||
<Border
|
<Border
|
||||||
Background="#353535"
|
Background="#353535"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
Width="150"
|
|
||||||
CornerRadius="10"
|
CornerRadius="10"
|
||||||
Padding="15">
|
Padding="15">
|
||||||
|
<!-- <StackPanel>
|
||||||
<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>
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
Text="Insert username:"
|
Text="Insert username:"
|
||||||
FontFamily="{StaticResource QuicksandFont}"/>
|
FontFamily="{StaticResource QuicksandFont}"/>
|
||||||
<TextBox Margin="5" Text="{Binding Usernick, Mode=TwoWay}" Width="200" />
|
<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>
|
||||||
|
|
||||||
<Border
|
|
||||||
|
<!-- Version selection -->
|
||||||
|
<!-- <Border
|
||||||
Background="#353535"
|
Background="#353535"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
Width="150"
|
Width="150"
|
||||||
CornerRadius="10"
|
CornerRadius="10"
|
||||||
Padding="10">
|
Padding="10">
|
||||||
|
|
||||||
<Button
|
|
||||||
FontFamily="{StaticResource QuicksandFont}"
|
</Border> -->
|
||||||
Content="Choose version"
|
|
||||||
Click="OnChooseVersionClick"
|
|
||||||
HorizontalAlignment="Center"/>
|
|
||||||
</Border>
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
|
<!-- Minecraft area end -->
|
||||||
|
|
||||||
|
<!-- Instruction panel in center-right -->
|
||||||
<StackPanel Height="300" Grid.Row="1" Grid.Column="2">
|
<StackPanel Height="300" Grid.Row="1" Grid.Column="2">
|
||||||
<Border
|
<Border
|
||||||
Background="#353535"
|
Background="#353535"
|
||||||
@ -136,7 +163,7 @@
|
|||||||
<Canvas>
|
<Canvas>
|
||||||
<Image
|
<Image
|
||||||
Height="60"
|
Height="60"
|
||||||
Source="/Assets/gitlab-logo.png"
|
Source="/Assets/Sprites/gitlab-logo.png"
|
||||||
Stretch="Uniform"
|
Stretch="Uniform"
|
||||||
PointerPressed="OnGitlabPressed"
|
PointerPressed="OnGitlabPressed"
|
||||||
Canvas.Left="290"
|
Canvas.Left="290"
|
||||||
@ -144,6 +171,8 @@
|
|||||||
</Canvas>
|
</Canvas>
|
||||||
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
<!-- Instruction panel end -->
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</Window>
|
</Window>
|
||||||
|
@ -1,11 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using Avalonia.Interactivity;
|
using Avalonia.Interactivity;
|
||||||
using Avalonia.VisualTree;
|
using Avalonia.VisualTree;
|
||||||
using Plombir;
|
using Plombir;
|
||||||
using CmlLib.Core.VersionMetadata;
|
|
||||||
using LauncherGUI.ViewModels;
|
using LauncherGUI.ViewModels;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Runtime.InteropServices;
|
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