- init: initial think
This commit is contained in:
52
Nebula.Launcher/Views/MainWindow.axaml
Normal file
52
Nebula.Launcher/Views/MainWindow.axaml
Normal file
@@ -0,0 +1,52 @@
|
||||
<Window xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:vm="using:Nebula.Launcher.ViewModels"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:asyncImageLoader="clr-namespace:AsyncImageLoader;assembly=AsyncImageLoader.Avalonia"
|
||||
xmlns:views="clr-namespace:Nebula.Launcher.Views"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="Nebula.Launcher.Views.MainWindow"
|
||||
x:DataType="vm:TestViewModel"
|
||||
Icon="/Assets/avalonia-logo.ico"
|
||||
Title="Nebula.Launcher">
|
||||
|
||||
|
||||
|
||||
<Grid ColumnDefinitions="60,*" RowDefinitions="*,40" Margin="0">
|
||||
<Border Grid.Row="0" Grid.Column="0"
|
||||
BorderThickness="0,0,2,0"
|
||||
CornerRadius="0,8,8,0"
|
||||
Padding="0" Margin="0,0,5,0">
|
||||
<StackPanel>
|
||||
<Button Classes="ViewSelectButton">
|
||||
<Image Source="../Assets/account.png"/>
|
||||
</Button>
|
||||
<Button Classes="ViewSelectButton">
|
||||
<Image Source="../Assets/list.png"/>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<StackPanel Grid.Column="1" Grid.Row="0">
|
||||
<ScrollViewer
|
||||
HorizontalScrollBarVisibility="Visible"
|
||||
VerticalScrollBarVisibility="Disabled"
|
||||
Padding="5">
|
||||
<views:ServerList/>
|
||||
</ScrollViewer>
|
||||
</StackPanel>
|
||||
|
||||
<Border Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2"
|
||||
BorderThickness="0,2,0,0"
|
||||
CornerRadius="0,0,0,0"
|
||||
Padding="5"
|
||||
Margin="0,0,0,0">
|
||||
<Panel>
|
||||
<TextBlock HorizontalAlignment="Left" VerticalAlignment="Center">Site: ssilka | Discord: lala</TextBlock>
|
||||
<TextBlock HorizontalAlignment="Right" VerticalAlignment="Center">v1.5</TextBlock>
|
||||
</Panel>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
</Window>
|
||||
11
Nebula.Launcher/Views/MainWindow.axaml.cs
Normal file
11
Nebula.Launcher/Views/MainWindow.axaml.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace Nebula.Launcher.Views;
|
||||
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
36
Nebula.Launcher/Views/ServerContainer.axaml
Normal file
36
Nebula.Launcher/Views/ServerContainer.axaml
Normal file
@@ -0,0 +1,36 @@
|
||||
<UserControl xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:asyncImageLoader="clr-namespace:AsyncImageLoader;assembly=AsyncImageLoader.Avalonia"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="Nebula.Launcher.Views.ServerContainer">
|
||||
<Grid ColumnDefinitions="*,70" RowDefinitions="*,*" Margin="0,5,0,5">
|
||||
<Border Grid.Row="0" Grid.Column="0"
|
||||
Padding="5">
|
||||
<TextBlock>Server name</TextBlock>
|
||||
</Border>
|
||||
<Border Grid.Row="0" Grid.Column="1"
|
||||
BorderThickness="2,0,0,0"
|
||||
CornerRadius="0"
|
||||
Padding="5">
|
||||
<TextBlock HorizontalAlignment="Center">15/15</TextBlock>
|
||||
</Border>
|
||||
|
||||
<Border Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2"
|
||||
Height="50"
|
||||
CornerRadius="0,0,10,10">
|
||||
<Border.Background>
|
||||
<ImageBrush Stretch="UniformToFill"
|
||||
asyncImageLoader:ImageBrushLoader.Source="https://t4.ftcdn.net/jpg/00/81/55/69/360_F_81556974_8sF8cKszJaRfBGd5sDt1RXE2QbzDtQqs.jpg">
|
||||
</ImageBrush>
|
||||
</Border.Background>
|
||||
</Border>
|
||||
|
||||
<Panel Grid.Row="1" Grid.Column="1">
|
||||
<Button VerticalAlignment="Stretch" CornerRadius="0 0 10 0" BorderThickness="0,0,0,0">
|
||||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Margin="5">Play</TextBlock>
|
||||
</Button>
|
||||
</Panel>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
13
Nebula.Launcher/Views/ServerContainer.axaml.cs
Normal file
13
Nebula.Launcher/Views/ServerContainer.axaml.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace Nebula.Launcher.Views;
|
||||
|
||||
public partial class ServerContainer : UserControl
|
||||
{
|
||||
public ServerContainer()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
17
Nebula.Launcher/Views/ServerList.axaml
Normal file
17
Nebula.Launcher/Views/ServerList.axaml
Normal file
@@ -0,0 +1,17 @@
|
||||
<UserControl xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:views="clr-namespace:Nebula.Launcher.Views"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="Nebula.Launcher.Views.ServerList">
|
||||
<StackPanel>
|
||||
<views:ServerContainer/>
|
||||
<views:ServerContainer/>
|
||||
<views:ServerContainer/>
|
||||
<views:ServerContainer/>
|
||||
<views:ServerContainer/>
|
||||
<views:ServerContainer/>
|
||||
<views:ServerContainer/>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
13
Nebula.Launcher/Views/ServerList.axaml.cs
Normal file
13
Nebula.Launcher/Views/ServerList.axaml.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace Nebula.Launcher.Views;
|
||||
|
||||
public partial class ServerList : UserControl
|
||||
{
|
||||
public ServerList()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user