2022-05-15 13:30:15 +02:00
|
|
|
<window:StyleableWindow
|
2022-12-29 15:24:05 +01:00
|
|
|
x:Class="Ryujinx.Ava.UI.Windows.MainWindow"
|
2022-05-15 13:30:15 +02:00
|
|
|
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"
|
2022-12-29 15:24:05 +01:00
|
|
|
xmlns:window="clr-namespace:Ryujinx.Ava.UI.Windows"
|
2023-01-08 18:46:25 +01:00
|
|
|
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
|
2022-12-29 15:24:05 +01:00
|
|
|
xmlns:helpers="clr-namespace:Ryujinx.Ava.UI.Helpers"
|
2023-01-08 18:46:25 +01:00
|
|
|
xmlns:controls="clr-namespace:Ryujinx.Ava.UI.Controls"
|
|
|
|
xmlns:main="clr-namespace:Ryujinx.Ava.UI.Views.Main"
|
|
|
|
Cursor="{Binding Cursor}"
|
|
|
|
Title="{Binding Title}"
|
|
|
|
WindowState="{Binding WindowState}"
|
2022-05-15 13:30:15 +02:00
|
|
|
Width="1280"
|
2022-12-09 15:21:54 +01:00
|
|
|
Height="777"
|
2022-11-30 23:34:25 +01:00
|
|
|
MinWidth="1092"
|
2022-12-09 15:21:54 +01:00
|
|
|
MinHeight="672"
|
2022-06-23 20:59:02 +02:00
|
|
|
d:DesignHeight="720"
|
|
|
|
d:DesignWidth="1280"
|
2022-05-15 13:30:15 +02:00
|
|
|
x:CompileBindings="True"
|
|
|
|
x:DataType="viewModels:MainWindowViewModel"
|
2022-06-23 20:59:02 +02:00
|
|
|
WindowStartupLocation="CenterScreen"
|
2022-12-05 23:04:18 +01:00
|
|
|
mc:Ignorable="d"
|
|
|
|
Focusable="True">
|
2022-05-15 13:30:15 +02:00
|
|
|
<Window.Styles>
|
|
|
|
<Style Selector="TitleBar:fullscreen">
|
|
|
|
<Setter Property="Background" Value="#000000" />
|
|
|
|
</Style>
|
|
|
|
</Window.Styles>
|
|
|
|
<Design.DataContext>
|
|
|
|
<viewModels:MainWindowViewModel />
|
|
|
|
</Design.DataContext>
|
|
|
|
<Window.Resources>
|
2022-12-29 15:24:05 +01:00
|
|
|
<helpers:BitmapArrayValueConverter x:Key="ByteImage" />
|
2022-05-15 13:30:15 +02:00
|
|
|
</Window.Resources>
|
|
|
|
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
<RowDefinition Height="*" />
|
|
|
|
</Grid.RowDefinitions>
|
2022-12-29 15:24:05 +01:00
|
|
|
<helpers:OffscreenTextBox Name="HiddenTextBox" Grid.Row="0" />
|
2022-06-23 20:59:02 +02:00
|
|
|
<StackPanel Grid.Row="0" IsVisible="False">
|
2022-12-29 15:24:05 +01:00
|
|
|
<helpers:HotKeyControl Name="FullscreenHotKey" Command="{ReflectionBinding ToggleFullscreen}" />
|
|
|
|
<helpers:HotKeyControl Name="FullscreenHotKey2" Command="{ReflectionBinding ToggleFullscreen}" />
|
|
|
|
<helpers:HotKeyControl Name="DockToggleHotKey" Command="{ReflectionBinding ToggleDockMode}" />
|
|
|
|
<helpers:HotKeyControl Name="ExitHotKey" Command="{ReflectionBinding ExitCurrentState}" />
|
2022-05-15 13:30:15 +02:00
|
|
|
</StackPanel>
|
2022-06-23 20:59:02 +02:00
|
|
|
<Grid
|
|
|
|
Grid.Row="1"
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
VerticalAlignment="Stretch">
|
2022-05-15 13:30:15 +02:00
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="*" />
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
<RowDefinition Height="*" />
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
<StackPanel
|
2022-11-30 23:34:25 +01:00
|
|
|
Name="MenuBar"
|
|
|
|
MinHeight="35"
|
2022-05-15 13:30:15 +02:00
|
|
|
Grid.Row="0"
|
|
|
|
Margin="0"
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
VerticalAlignment="Stretch"
|
|
|
|
IsVisible="{Binding ShowMenuAndStatusBar}"
|
|
|
|
Orientation="Vertical">
|
2023-01-08 18:46:25 +01:00
|
|
|
<main:MainMenuBarView
|
|
|
|
Name="MenuBarView" />
|
2022-05-15 13:30:15 +02:00
|
|
|
</StackPanel>
|
|
|
|
<ContentControl
|
2022-07-29 00:41:34 +02:00
|
|
|
Name="MainContent"
|
2022-05-15 13:30:15 +02:00
|
|
|
Grid.Row="1"
|
|
|
|
Padding="0"
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
VerticalAlignment="Stretch"
|
|
|
|
BorderBrush="{DynamicResource ThemeControlBorderColor}"
|
|
|
|
BorderThickness="0,0,0,0"
|
2022-06-23 20:59:02 +02:00
|
|
|
DockPanel.Dock="Top"
|
|
|
|
IsVisible="{Binding ShowContent}">
|
2023-01-08 18:46:25 +01:00
|
|
|
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Name="GameLibrary">
|
2022-05-15 13:30:15 +02:00
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
<RowDefinition Height="*" />
|
|
|
|
</Grid.RowDefinitions>
|
2023-01-08 18:46:25 +01:00
|
|
|
<main:MainViewControls
|
|
|
|
Name="ViewControls"
|
|
|
|
Grid.Row="0"/>
|
2022-05-15 13:30:15 +02:00
|
|
|
<controls:GameListView
|
|
|
|
x:Name="GameList"
|
|
|
|
Grid.Row="1"
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
VerticalAlignment="Stretch"
|
2022-06-23 20:59:02 +02:00
|
|
|
HorizontalContentAlignment="Stretch"
|
|
|
|
VerticalContentAlignment="Stretch"
|
2022-05-15 13:30:15 +02:00
|
|
|
IsVisible="{Binding IsList}" />
|
|
|
|
<controls:GameGridView
|
|
|
|
x:Name="GameGrid"
|
|
|
|
Grid.Row="1"
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
VerticalAlignment="Stretch"
|
2022-06-23 20:59:02 +02:00
|
|
|
HorizontalContentAlignment="Stretch"
|
|
|
|
VerticalContentAlignment="Stretch"
|
2022-05-15 13:30:15 +02:00
|
|
|
IsVisible="{Binding IsGrid}" />
|
|
|
|
</Grid>
|
|
|
|
</ContentControl>
|
2022-06-23 20:59:02 +02:00
|
|
|
<Grid
|
|
|
|
Grid.Row="1"
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
VerticalAlignment="Stretch"
|
|
|
|
Background="{DynamicResource ThemeContentBackgroundColor}"
|
|
|
|
IsVisible="{Binding ShowLoadProgress}"
|
2022-09-19 20:05:26 +02:00
|
|
|
Name="LoadingView"
|
2022-06-23 20:59:02 +02:00
|
|
|
ZIndex="1000">
|
2022-05-15 13:30:15 +02:00
|
|
|
<Grid
|
|
|
|
Margin="40"
|
2022-06-23 20:59:02 +02:00
|
|
|
HorizontalAlignment="Center"
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
IsVisible="{Binding ShowLoadProgress}">
|
2022-05-15 13:30:15 +02:00
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="Auto" />
|
|
|
|
<ColumnDefinition Width="*" />
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Border
|
|
|
|
Grid.RowSpan="2"
|
2022-06-23 20:59:02 +02:00
|
|
|
Grid.Column="0"
|
2022-05-15 13:30:15 +02:00
|
|
|
Width="256"
|
|
|
|
Height="256"
|
|
|
|
Margin="10"
|
|
|
|
Padding="4"
|
|
|
|
BorderBrush="Black"
|
|
|
|
BorderThickness="2"
|
|
|
|
BoxShadow="4 4 32 8 #40000000"
|
2022-06-23 20:59:02 +02:00
|
|
|
CornerRadius="3"
|
|
|
|
IsVisible="{Binding ShowLoadProgress}">
|
2022-05-15 13:30:15 +02:00
|
|
|
<Image
|
|
|
|
Width="256"
|
|
|
|
Height="256"
|
2022-06-23 20:59:02 +02:00
|
|
|
IsVisible="{Binding ShowLoadProgress}"
|
2022-05-15 13:30:15 +02:00
|
|
|
Source="{Binding SelectedIcon, Converter={StaticResource ByteImage}}" />
|
|
|
|
</Border>
|
2022-06-23 20:59:02 +02:00
|
|
|
<Grid
|
|
|
|
Grid.Column="1"
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
IsVisible="{Binding ShowLoadProgress}">
|
2022-05-15 13:30:15 +02:00
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock
|
|
|
|
Grid.Row="0"
|
|
|
|
Margin="10"
|
|
|
|
FontSize="30"
|
|
|
|
FontWeight="Bold"
|
2022-06-23 20:59:02 +02:00
|
|
|
IsVisible="{Binding ShowLoadProgress}"
|
2022-05-15 13:30:15 +02:00
|
|
|
Text="{Binding LoadHeading}"
|
2022-06-23 20:59:02 +02:00
|
|
|
TextAlignment="Left"
|
2023-01-08 18:46:25 +01:00
|
|
|
TextWrapping="Wrap"
|
|
|
|
MaxWidth="500" />
|
2022-05-15 13:30:15 +02:00
|
|
|
<Border
|
|
|
|
Grid.Row="1"
|
2022-06-23 20:59:02 +02:00
|
|
|
Margin="10"
|
2022-05-15 13:30:15 +02:00
|
|
|
Padding="0"
|
|
|
|
HorizontalAlignment="Stretch"
|
2022-06-23 20:59:02 +02:00
|
|
|
BorderBrush="{Binding ProgressBarBackgroundColor}"
|
|
|
|
BorderThickness="1"
|
|
|
|
ClipToBounds="True"
|
|
|
|
CornerRadius="5"
|
|
|
|
IsVisible="{Binding ShowLoadProgress}">
|
2022-05-15 13:30:15 +02:00
|
|
|
<ProgressBar
|
|
|
|
Height="10"
|
2022-06-23 20:59:02 +02:00
|
|
|
MinWidth="500"
|
2022-05-15 13:30:15 +02:00
|
|
|
Margin="0"
|
|
|
|
Padding="0"
|
|
|
|
HorizontalAlignment="Stretch"
|
2022-06-23 20:59:02 +02:00
|
|
|
ClipToBounds="True"
|
|
|
|
CornerRadius="5"
|
2022-05-15 13:30:15 +02:00
|
|
|
Foreground="{Binding ProgressBarForegroundColor}"
|
2022-06-23 20:59:02 +02:00
|
|
|
IsIndeterminate="{Binding IsLoadingIndeterminate}"
|
|
|
|
IsVisible="{Binding ShowLoadProgress}"
|
2022-05-15 13:30:15 +02:00
|
|
|
Maximum="{Binding ProgressMaximum}"
|
|
|
|
Minimum="0"
|
|
|
|
Value="{Binding ProgressValue}" />
|
|
|
|
</Border>
|
|
|
|
<TextBlock
|
|
|
|
Grid.Row="2"
|
|
|
|
Margin="10"
|
|
|
|
FontSize="18"
|
2022-06-23 20:59:02 +02:00
|
|
|
IsVisible="{Binding ShowLoadProgress}"
|
2022-05-15 13:30:15 +02:00
|
|
|
Text="{Binding CacheLoadStatus}"
|
2023-01-08 18:46:25 +01:00
|
|
|
TextAlignment="Left"
|
|
|
|
MaxWidth="500" />
|
2022-05-15 13:30:15 +02:00
|
|
|
</Grid>
|
|
|
|
</Grid>
|
|
|
|
</Grid>
|
2023-01-08 18:46:25 +01:00
|
|
|
<main:MainStatusBarView
|
|
|
|
Name="StatusBarView"
|
|
|
|
Grid.Row="2" />
|
2022-05-15 13:30:15 +02:00
|
|
|
</Grid>
|
|
|
|
</Grid>
|
2023-01-08 18:46:25 +01:00
|
|
|
</window:StyleableWindow>
|