2022-07-28 22:41:34 +00:00
|
|
|
<window:StyleableWindow
|
2022-12-29 14:24:05 +00:00
|
|
|
x:Class="Ryujinx.Ava.UI.Windows.CheatWindow"
|
2022-07-28 22:41:34 +00: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:locale="clr-namespace:Ryujinx.Ava.Common.Locale"
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
2022-12-29 14:24:05 +00:00
|
|
|
xmlns:model="clr-namespace:Ryujinx.Ava.UI.Models"
|
|
|
|
xmlns:window="clr-namespace:Ryujinx.Ava.UI.Windows"
|
2022-07-28 22:41:34 +00:00
|
|
|
Width="500"
|
|
|
|
Height="500"
|
|
|
|
MinWidth="500"
|
|
|
|
MinHeight="500"
|
|
|
|
WindowStartupLocation="CenterOwner"
|
2022-12-05 22:04:18 +00:00
|
|
|
mc:Ignorable="d"
|
|
|
|
Focusable="True">
|
2022-07-08 18:47:11 +00:00
|
|
|
<Window.Styles>
|
|
|
|
<Style Selector="TreeViewItem">
|
|
|
|
<Setter Property="IsExpanded" Value="True" />
|
|
|
|
</Style>
|
|
|
|
</Window.Styles>
|
2022-07-28 22:41:34 +00:00
|
|
|
<Grid Name="CheatGrid" Margin="15">
|
2022-07-08 18:47:11 +00:00
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
<RowDefinition Height="*" />
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock
|
|
|
|
Grid.Row="1"
|
2022-07-28 22:41:34 +00:00
|
|
|
MaxWidth="500"
|
2022-07-08 18:47:11 +00:00
|
|
|
Margin="20,15,20,20"
|
|
|
|
HorizontalAlignment="Center"
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
LineHeight="18"
|
|
|
|
Text="{Binding Heading}"
|
2022-07-28 22:41:34 +00:00
|
|
|
TextAlignment="Center"
|
|
|
|
TextWrapping="Wrap" />
|
2022-07-08 18:47:11 +00:00
|
|
|
<Border
|
|
|
|
Grid.Row="2"
|
|
|
|
Margin="5"
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
VerticalAlignment="Stretch"
|
|
|
|
BorderBrush="Gray"
|
|
|
|
BorderThickness="1">
|
2022-07-28 22:41:34 +00:00
|
|
|
<TreeView
|
|
|
|
Name="CheatsView"
|
|
|
|
MinHeight="300"
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
VerticalAlignment="Stretch"
|
|
|
|
Items="{Binding LoadedCheats}">
|
2022-07-11 22:25:33 +00:00
|
|
|
<TreeView.Styles>
|
|
|
|
<Styles>
|
|
|
|
<Style Selector="TreeViewItem:empty /template/ ItemsPresenter">
|
2022-07-28 22:41:34 +00:00
|
|
|
<Setter Property="IsVisible" Value="False" />
|
2022-07-11 22:25:33 +00:00
|
|
|
</Style>
|
|
|
|
</Styles>
|
|
|
|
</TreeView.Styles>
|
2022-07-08 18:47:11 +00:00
|
|
|
<TreeView.DataTemplates>
|
|
|
|
<TreeDataTemplate DataType="model:CheatsList" ItemsSource="{Binding}">
|
|
|
|
<StackPanel HorizontalAlignment="Left" Orientation="Horizontal">
|
2022-07-28 22:41:34 +00:00
|
|
|
<CheckBox MinWidth="20" IsChecked="{Binding IsEnabled}" />
|
|
|
|
<TextBlock Width="150" Text="{Binding BuildId}" />
|
|
|
|
<TextBlock Text="{Binding Path}" />
|
2022-07-08 18:47:11 +00:00
|
|
|
</StackPanel>
|
|
|
|
</TreeDataTemplate>
|
|
|
|
<DataTemplate x:DataType="model:CheatModel">
|
2022-07-28 22:41:34 +00:00
|
|
|
<StackPanel
|
|
|
|
Margin="0"
|
|
|
|
HorizontalAlignment="Left"
|
|
|
|
Orientation="Horizontal">
|
|
|
|
<CheckBox
|
|
|
|
MinWidth="20"
|
|
|
|
Margin="5,0"
|
|
|
|
Padding="0"
|
|
|
|
IsChecked="{Binding IsEnabled}" />
|
|
|
|
<TextBlock VerticalAlignment="Center" Text="{Binding CleanName}" />
|
2022-07-08 18:47:11 +00:00
|
|
|
</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"
|
2022-07-28 22:41:34 +00:00
|
|
|
Command="{Binding Save}"
|
|
|
|
IsVisible="{Binding !NoCheatsFound}">
|
2022-07-08 18:47:11 +00:00
|
|
|
<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>
|