rjx-mirror/Ryujinx.Ava/Ui/Windows/CheatWindow.axaml
Emmanuel Hansen 7d9a5feccb
Avalonia - Couple fixes and improvements (#3451)
* fix updater check crash

* remove line

* reduce cheat window sizes

* enable tiered compilation and r2r

* remove warning on LaunchState

* remove warnings related to tasks

* addressed review

* undo csproj indentation

* fix tabs in axaml file

* remove double line

* remove R2R
2022-07-12 00:25:33 +02:00

96 lines
No EOL
4.2 KiB
XML

<window:StyleableWindow x:Class="Ryujinx.Ava.Ui.Windows.CheatWindow"
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:locale="clr-namespace:Ryujinx.Ava.Common.Locale"
xmlns:model="clr-namespace:Ryujinx.Ava.Ui.Models"
xmlns:window="clr-namespace:Ryujinx.Ava.Ui.Windows"
mc:Ignorable="d"
Width="500" MinHeight="500" Height="500"
WindowStartupLocation="CenterOwner"
MinWidth="500">
<Window.Styles>
<Style Selector="TreeViewItem">
<Setter Property="IsExpanded" Value="True" />
</Style>
</Window.Styles>
<Grid Name="DlcGrid" Margin="15">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBlock
Grid.Row="1"
Margin="20,15,20,20"
HorizontalAlignment="Center"
VerticalAlignment="Center"
MaxWidth="500"
LineHeight="18"
TextWrapping="Wrap"
Text="{Binding Heading}"
TextAlignment="Center" />
<Border
Grid.Row="2"
Margin="5"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
BorderBrush="Gray"
BorderThickness="1">
<TreeView Items="{Binding LoadedCheats}"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Name="CheatsView"
MinHeight="300">
<TreeView.Styles>
<Styles>
<Style Selector="TreeViewItem:empty /template/ ItemsPresenter">
<Setter Property="IsVisible" Value="False"/>
</Style>
</Styles>
</TreeView.Styles>
<TreeView.DataTemplates>
<TreeDataTemplate DataType="model:CheatsList" ItemsSource="{Binding}">
<StackPanel HorizontalAlignment="Left" Orientation="Horizontal">
<CheckBox IsChecked="{Binding IsEnabled}" MinWidth="20" />
<TextBlock Width="150"
Text="{Binding BuildId}" />
<TextBlock
Text="{Binding Path}" />
</StackPanel>
</TreeDataTemplate>
<DataTemplate x:DataType="model:CheatModel">
<StackPanel Orientation="Horizontal" Margin="0" HorizontalAlignment="Left">
<CheckBox IsChecked="{Binding IsEnabled}" Padding="0" Margin="5,0" MinWidth="20" />
<TextBlock Text="{Binding CleanName}" VerticalAlignment="Center" />
</StackPanel>
</DataTemplate>
</TreeView.DataTemplates>
</TreeView>
</Border>
<DockPanel
Grid.Row="3"
Margin="0"
HorizontalAlignment="Stretch">
<DockPanel Margin="0" HorizontalAlignment="Right">
<Button
Name="SaveButton"
MinWidth="90"
Margin="5"
IsVisible="{Binding !NoCheatsFound}"
Command="{Binding Save}">
<TextBlock Text="{locale:Locale SettingsButtonSave}" />
</Button>
<Button
Name="CancelButton"
MinWidth="90"
Margin="5"
Command="{Binding Close}">
<TextBlock Text="{locale:Locale InputDialogCancel}" />
</Button>
</DockPanel>
</DockPanel>
</Grid>
</window:StyleableWindow>