mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-12-15 10:36:58 +00:00
Actions Changes
This commit is contained in:
parent
e8225ce7aa
commit
c065a7676b
11 changed files with 1158 additions and 1267 deletions
1902
assets/locales.json
1902
assets/locales.json
File diff suppressed because it is too large
Load diff
|
|
@ -105,8 +105,7 @@
|
||||||
CommandParameter="{Binding}"
|
CommandParameter="{Binding}"
|
||||||
Header="{ext:Locale GameListContextMenuTrimXCI}"
|
Header="{ext:Locale GameListContextMenuTrimXCI}"
|
||||||
IsEnabled="{Binding TrimXCIEnabled}"
|
IsEnabled="{Binding TrimXCIEnabled}"
|
||||||
Icon="{ext:Icon fa-solid fa-scissors}"
|
Icon="{ext:Icon fa-solid fa-scissors}" />
|
||||||
ToolTip.Tip="{ext:Locale GameListContextMenuTrimXCIToolTip}" />
|
|
||||||
<MenuItem Header="{ext:Locale GameListContextMenuCacheManagement}" Icon="{ext:Icon fa-solid fa-memory}">
|
<MenuItem Header="{ext:Locale GameListContextMenuCacheManagement}" Icon="{ext:Icon fa-solid fa-memory}">
|
||||||
<MenuItem
|
<MenuItem
|
||||||
Command="{Binding PurgePtcCache}"
|
Command="{Binding PurgePtcCache}"
|
||||||
|
|
|
||||||
|
|
@ -454,7 +454,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||||
usageStringBuilder.Append($"{LocaleManager.Instance[LocaleKeys.Unknown]}.");
|
usageStringBuilder.Append($"{LocaleManager.Instance[LocaleKeys.Unknown]}.");
|
||||||
}
|
}
|
||||||
|
|
||||||
Usage = $"{LocaleManager.Instance[LocaleKeys.Usage]} {(writable ? $" ({LocaleManager.Instance[LocaleKeys.Writable]})" : string.Empty)} : {usageStringBuilder}";
|
Usage = $"{LocaleManager.Instance[LocaleKeys.AmiiboUsage]}{(writable ? $"({LocaleManager.Instance[LocaleKeys.Writable]})" : string.Empty)}{usageStringBuilder}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -925,7 +925,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||||
}
|
}
|
||||||
|
|
||||||
dialogMessage +=
|
dialogMessage +=
|
||||||
LocaleManager.Instance[LocaleKeys.DialogFirmwareInstallerFirmwareInstallConfirmMessage];
|
LocaleManager.Instance[LocaleKeys.DialogFirmwareInstallerFirmwareAndKeysInstallConfirmMessage];
|
||||||
|
|
||||||
UserResult result = await ContentDialogHelper.CreateConfirmationDialog(
|
UserResult result = await ContentDialogHelper.CreateConfirmationDialog(
|
||||||
dialogTitle,
|
dialogTitle,
|
||||||
|
|
@ -1025,7 +1025,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||||
}
|
}
|
||||||
|
|
||||||
string dialogTitle =
|
string dialogTitle =
|
||||||
LocaleManager.Instance.UpdateAndGetDynamicValue(LocaleKeys.DialogKeysInstallerKeysInstallTitle);
|
LocaleManager.Instance.UpdateAndGetDynamicValue(LocaleKeys.MenuBarActionsInstallKeys);
|
||||||
string dialogMessage =
|
string dialogMessage =
|
||||||
LocaleManager.Instance.UpdateAndGetDynamicValue(LocaleKeys.DialogKeysInstallerKeysInstallMessage);
|
LocaleManager.Instance.UpdateAndGetDynamicValue(LocaleKeys.DialogKeysInstallerKeysInstallMessage);
|
||||||
|
|
||||||
|
|
@ -1036,7 +1036,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||||
.DialogKeysInstallerKeysInstallSubMessage);
|
.DialogKeysInstallerKeysInstallSubMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
dialogMessage += LocaleManager.Instance[LocaleKeys.DialogKeysInstallerKeysInstallConfirmMessage];
|
dialogMessage += LocaleManager.Instance[LocaleKeys.DialogFirmwareInstallerFirmwareAndKeysInstallConfirmMessage];
|
||||||
|
|
||||||
UserResult result = await ContentDialogHelper.CreateConfirmationDialog(
|
UserResult result = await ContentDialogHelper.CreateConfirmationDialog(
|
||||||
dialogTitle,
|
dialogTitle,
|
||||||
|
|
@ -1354,9 +1354,10 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||||
{
|
{
|
||||||
Optional<IStorageFile> result = await StorageProvider.OpenSingleFilePickerAsync(new FilePickerOpenOptions
|
Optional<IStorageFile> result = await StorageProvider.OpenSingleFilePickerAsync(new FilePickerOpenOptions
|
||||||
{
|
{
|
||||||
|
Title = LocaleManager.Instance[LocaleKeys.InstallFirmwareFromFileDialogTitle],
|
||||||
FileTypeFilter = new List<FilePickerFileType>
|
FileTypeFilter = new List<FilePickerFileType>
|
||||||
{
|
{
|
||||||
new(LocaleManager.Instance[LocaleKeys.FileDialogAllTypes])
|
new(LocaleManager.Instance[LocaleKeys.AllSupportedFormats])
|
||||||
{
|
{
|
||||||
Patterns = ["*.xci", "*.zip"],
|
Patterns = ["*.xci", "*.zip"],
|
||||||
AppleUniformTypeIdentifiers = ["com.ryujinx.xci", "public.zip-archive"],
|
AppleUniformTypeIdentifiers = ["com.ryujinx.xci", "public.zip-archive"],
|
||||||
|
|
@ -1385,7 +1386,10 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||||
|
|
||||||
public async Task InstallFirmwareFromFolder()
|
public async Task InstallFirmwareFromFolder()
|
||||||
{
|
{
|
||||||
Optional<IStorageFolder> result = await StorageProvider.OpenSingleFolderPickerAsync();
|
Optional<IStorageFolder> result = await StorageProvider.OpenSingleFolderPickerAsync(new FolderPickerOpenOptions
|
||||||
|
{
|
||||||
|
Title = LocaleManager.Instance[LocaleKeys.InstallFirmwareFromFolderDialogTitle]
|
||||||
|
});
|
||||||
|
|
||||||
if (result.HasValue)
|
if (result.HasValue)
|
||||||
{
|
{
|
||||||
|
|
@ -1397,6 +1401,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||||
{
|
{
|
||||||
Optional<IStorageFile> result = await StorageProvider.OpenSingleFilePickerAsync(new FilePickerOpenOptions
|
Optional<IStorageFile> result = await StorageProvider.OpenSingleFilePickerAsync(new FilePickerOpenOptions
|
||||||
{
|
{
|
||||||
|
Title = LocaleManager.Instance[LocaleKeys.InstallKeysFromFileDialogTitle],
|
||||||
FileTypeFilter = new List<FilePickerFileType>
|
FileTypeFilter = new List<FilePickerFileType>
|
||||||
{
|
{
|
||||||
new("KEYS")
|
new("KEYS")
|
||||||
|
|
@ -1416,7 +1421,10 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||||
|
|
||||||
public async Task InstallKeysFromFolder()
|
public async Task InstallKeysFromFolder()
|
||||||
{
|
{
|
||||||
Optional<IStorageFolder> result = await StorageProvider.OpenSingleFolderPickerAsync();
|
Optional<IStorageFolder> result = await StorageProvider.OpenSingleFolderPickerAsync(new FolderPickerOpenOptions
|
||||||
|
{
|
||||||
|
Title = LocaleManager.Instance[LocaleKeys.InstallKeysFromFolderDialogTitle]
|
||||||
|
});
|
||||||
|
|
||||||
if (result.HasValue)
|
if (result.HasValue)
|
||||||
{
|
{
|
||||||
|
|
@ -1838,17 +1846,35 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task OpenBinFile()
|
public async Task OpenCheatManagerForCurrentApp()
|
||||||
|
{
|
||||||
|
if (IsGameRunning)
|
||||||
|
{
|
||||||
|
string name = AppHost.Device.Processes.ActiveApplication.ApplicationControlProperties.Title[(int)AppHost.Device.System.State.DesiredTitleLanguage].NameString.ToString();
|
||||||
|
|
||||||
|
await StyleableAppWindow.ShowAsync(
|
||||||
|
new CheatWindow(
|
||||||
|
Window.VirtualFileSystem,
|
||||||
|
AppHost.Device.Processes.ActiveApplication.ProgramIdText,
|
||||||
|
name,
|
||||||
|
SelectedApplication.Path)
|
||||||
|
);
|
||||||
|
|
||||||
|
AppHost.Device.EnableCheats();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task OpenAmiiboBinFile()
|
||||||
{
|
{
|
||||||
if (AppHost.Device.System.SearchingForAmiibo(out _) && IsGameRunning)
|
if (AppHost.Device.System.SearchingForAmiibo(out _) && IsGameRunning)
|
||||||
{
|
{
|
||||||
Optional<IStorageFile> result = await StorageProvider.OpenSingleFilePickerAsync(
|
Optional<IStorageFile> result = await StorageProvider.OpenSingleFilePickerAsync(
|
||||||
new FilePickerOpenOptions
|
new FilePickerOpenOptions
|
||||||
{
|
{
|
||||||
Title = LocaleManager.Instance[LocaleKeys.OpenFileDialogTitle],
|
Title = LocaleManager.Instance[LocaleKeys.OpenAmiiboBinFileDialogTitle],
|
||||||
FileTypeFilter = new List<FilePickerFileType>
|
FileTypeFilter = new List<FilePickerFileType>
|
||||||
{
|
{
|
||||||
new(LocaleManager.Instance[LocaleKeys.AllSupportedFormats])
|
new("BIN")
|
||||||
{
|
{
|
||||||
Patterns = ["*.bin"],
|
Patterns = ["*.bin"],
|
||||||
}
|
}
|
||||||
|
|
@ -2012,11 +2038,10 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||||
|
|
||||||
if (trimmer.CanBeTrimmed)
|
if (trimmer.CanBeTrimmed)
|
||||||
{
|
{
|
||||||
double savings = (double)trimmer.DiskSpaceSavingsB / 1024.0 / 1024.0;
|
int savings = (int)Math.Round((double)trimmer.DiskSpaceSavingsB / 1024.0 / 1024.0);
|
||||||
double currentFileSize = (double)trimmer.FileSizeB / 1024.0 / 1024.0;
|
int currentFileSize = (int)Math.Round((double)trimmer.FileSizeB / 1024.0 / 1024.0);
|
||||||
double cartDataSize = (double)trimmer.DataSizeB / 1024.0 / 1024.0;
|
int cartDataSize = (int)Math.Round((double)trimmer.DataSizeB / 1024.0 / 1024.0);
|
||||||
string secondaryText = LocaleManager.Instance.UpdateAndGetDynamicValue(
|
string secondaryText = LocaleManager.Instance.UpdateAndGetDynamicValue(LocaleKeys.TrimXCIFileDialogSecondaryText, currentFileSize.ToString("0"), cartDataSize.ToString("0"), savings.ToString("0"));
|
||||||
LocaleKeys.TrimXCIFileDialogSecondaryText, currentFileSize, cartDataSize, savings);
|
|
||||||
|
|
||||||
UserResult result = await ContentDialogHelper.CreateConfirmationDialog(
|
UserResult result = await ContentDialogHelper.CreateConfirmationDialog(
|
||||||
LocaleManager.Instance[LocaleKeys.TrimXCIFileDialogPrimaryText],
|
LocaleManager.Instance[LocaleKeys.TrimXCIFileDialogPrimaryText],
|
||||||
|
|
|
||||||
|
|
@ -115,6 +115,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||||
nameof(PotentialSavings),
|
nameof(PotentialSavings),
|
||||||
nameof(ActualSavings),
|
nameof(ActualSavings),
|
||||||
nameof(CanTrim),
|
nameof(CanTrim),
|
||||||
|
nameof(SavingsDifference),
|
||||||
nameof(CanUntrim));
|
nameof(CanUntrim));
|
||||||
|
|
||||||
DisplayedChanged();
|
DisplayedChanged();
|
||||||
|
|
@ -312,13 +313,14 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SelectDisplayed()
|
public void SelectAll()
|
||||||
{
|
{
|
||||||
|
SelectedXCIFiles.Clear();
|
||||||
SelectedXCIFiles.AddRange(DisplayedXCIFiles);
|
SelectedXCIFiles.AddRange(DisplayedXCIFiles);
|
||||||
SelectionChanged();
|
SelectionChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DeselectDisplayed()
|
public void DeselectAll()
|
||||||
{
|
{
|
||||||
SelectedXCIFiles.RemoveMany(DisplayedXCIFiles);
|
SelectedXCIFiles.RemoveMany(DisplayedXCIFiles);
|
||||||
SelectionChanged();
|
SelectionChanged();
|
||||||
|
|
@ -426,8 +428,8 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||||
{
|
{
|
||||||
return _processingMode switch
|
return _processingMode switch
|
||||||
{
|
{
|
||||||
ProcessingMode.Trimming => string.Format(LocaleManager.Instance[LocaleKeys.XCITrimmerTitleStatusTrimming], DisplayedXCIFiles.Count),
|
ProcessingMode.Trimming => string.Format(LocaleManager.Instance[LocaleKeys.XCITrimmerTitleStatusTrimming], SelectedXCIFiles.Count),
|
||||||
ProcessingMode.Untrimming => string.Format(LocaleManager.Instance[LocaleKeys.XCITrimmerTitleStatusUntrimming], DisplayedXCIFiles.Count),
|
ProcessingMode.Untrimming => string.Format(LocaleManager.Instance[LocaleKeys.XCITrimmerTitleStatusUntrimming], SelectedXCIFiles.Count),
|
||||||
_ => string.Empty
|
_ => string.Empty
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -529,6 +531,18 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string SavingsDifference
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
long potentialSavings = AllXCIFiles.Sum(xci => xci.PotentialSavingsB);
|
||||||
|
long actualSavings = AllXCIFiles.Sum(xci => xci.CurrentSavingsB);
|
||||||
|
long differenceMb = (potentialSavings - actualSavings) / BytesPerMb;
|
||||||
|
|
||||||
|
return string.Format(LocaleManager.Instance[LocaleKeys.XCITrimmerCanStillSaveMB], differenceMb);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public IEnumerable<XCITrimmerFileModel> SelectedDisplayedXCIFiles
|
public IEnumerable<XCITrimmerFileModel> SelectedDisplayedXCIFiles
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|
|
||||||
|
|
@ -13,102 +13,101 @@
|
||||||
x:DataType="viewModels:XciTrimmerViewModel"
|
x:DataType="viewModels:XciTrimmerViewModel"
|
||||||
Focusable="True"
|
Focusable="True"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<Grid Margin="20 0 20 0" RowDefinitions="Auto,Auto,*,Auto,Auto">
|
<Grid Margin="30,10,30,0" RowDefinitions="Auto,Auto,*,Auto,Auto">
|
||||||
<Panel
|
<Panel
|
||||||
Margin="10 10 10 10"
|
Margin="0,0,0,10"
|
||||||
Grid.Row="0">
|
Grid.Row="0">
|
||||||
<TextBlock Text="{Binding Status}" />
|
<TextBlock Text="{Binding Status}" />
|
||||||
</Panel>
|
</Panel>
|
||||||
<Panel
|
<Grid Margin="0,0,0,10" Grid.Row="1" IsVisible="{Binding !Processing}" ColumnDefinitions="Auto,*">
|
||||||
Margin="0 0 10 10"
|
<StackPanel
|
||||||
IsVisible="{Binding !Processing}"
|
Grid.Column="0"
|
||||||
Grid.Row="1">
|
Orientation="Horizontal"
|
||||||
<Grid ColumnDefinitions="Auto,*,Auto">
|
HorizontalAlignment="Left"
|
||||||
<StackPanel
|
VerticalAlignment="Center">
|
||||||
Grid.Column="0"
|
<Button
|
||||||
Orientation="Horizontal">
|
Name="SelectAllButton"
|
||||||
<DropDownButton
|
MinWidth="90"
|
||||||
Width="150"
|
Margin="0,0,10,0"
|
||||||
HorizontalAlignment="Left"
|
Command="{Binding SelectAll}">
|
||||||
VerticalAlignment="Center"
|
<TextBlock Text="{ext:Locale XCITrimmerSelectAll}" />
|
||||||
Content="{Binding SortingFieldName}">
|
</Button>
|
||||||
<DropDownButton.Flyout>
|
<Button
|
||||||
<Flyout Placement="Bottom">
|
Name="DeselectAllButton"
|
||||||
<StackPanel
|
MinWidth="90"
|
||||||
Margin="0"
|
Margin="0,0,0,0"
|
||||||
HorizontalAlignment="Stretch"
|
Command="{Binding DeselectAll}">
|
||||||
Orientation="Vertical">
|
<TextBlock Text="{ext:Locale XCITrimmerDeselectAll}" />
|
||||||
<StackPanel>
|
</Button>
|
||||||
<RadioButton
|
</StackPanel>
|
||||||
Checked="Sort_Checked"
|
<StackPanel
|
||||||
Content="{ext:Locale XCITrimmerSortName}"
|
Orientation="Horizontal"
|
||||||
GroupName="Sort"
|
Grid.Column="1"
|
||||||
IsChecked="{Binding IsSortedByName, Mode=OneTime}"
|
HorizontalAlignment="Right">
|
||||||
Tag="Name" />
|
<DropDownButton
|
||||||
<RadioButton
|
Width="150"
|
||||||
Checked="Sort_Checked"
|
HorizontalAlignment="Right"
|
||||||
Content="{ext:Locale XCITrimmerSortSaved}"
|
VerticalAlignment="Center"
|
||||||
GroupName="Sort"
|
Content="{Binding SortingFieldName}">
|
||||||
IsChecked="{Binding IsSortedBySaved, Mode=OneTime}"
|
<DropDownButton.Flyout>
|
||||||
Tag="Saved" />
|
<Flyout Placement="Bottom">
|
||||||
</StackPanel>
|
<StackPanel
|
||||||
<Border
|
Margin="0"
|
||||||
Width="60"
|
HorizontalAlignment="Stretch"
|
||||||
Height="2"
|
Orientation="Vertical">
|
||||||
Margin="5"
|
<StackPanel>
|
||||||
HorizontalAlignment="Stretch"
|
|
||||||
BorderBrush="White"
|
|
||||||
BorderThickness="0,1,0,0">
|
|
||||||
<Separator Height="0" HorizontalAlignment="Stretch" />
|
|
||||||
</Border>
|
|
||||||
<RadioButton
|
<RadioButton
|
||||||
Checked="Order_Checked"
|
Checked="Sort_Checked"
|
||||||
Content="{ext:Locale OrderAscending}"
|
Content="{ext:Locale XCITrimmerSortName}"
|
||||||
GroupName="Order"
|
GroupName="Sort"
|
||||||
IsChecked="{Binding SortingAscending, Mode=OneTime}"
|
IsChecked="{Binding IsSortedByName, Mode=OneTime}"
|
||||||
Tag="Ascending" />
|
Tag="Name" />
|
||||||
<RadioButton
|
<RadioButton
|
||||||
Checked="Order_Checked"
|
Checked="Sort_Checked"
|
||||||
Content="{ext:Locale OrderDescending}"
|
Content="{ext:Locale XCITrimmerSortSaved}"
|
||||||
GroupName="Order"
|
GroupName="Sort"
|
||||||
IsChecked="{Binding !SortingAscending, Mode=OneTime}"
|
IsChecked="{Binding IsSortedBySaved, Mode=OneTime}"
|
||||||
Tag="Descending" />
|
Tag="Saved" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Flyout>
|
<Border
|
||||||
</DropDownButton.Flyout>
|
Width="60"
|
||||||
</DropDownButton>
|
Height="2"
|
||||||
</StackPanel>
|
Margin="5"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
BorderBrush="White"
|
||||||
|
BorderThickness="0,1,0,0">
|
||||||
|
<Separator Height="0" HorizontalAlignment="Stretch" />
|
||||||
|
</Border>
|
||||||
|
<RadioButton
|
||||||
|
Checked="Order_Checked"
|
||||||
|
Content="{ext:Locale OrderAscending}"
|
||||||
|
GroupName="Order"
|
||||||
|
IsChecked="{Binding SortingAscending, Mode=OneTime}"
|
||||||
|
Tag="Ascending" />
|
||||||
|
<RadioButton
|
||||||
|
Checked="Order_Checked"
|
||||||
|
Content="{ext:Locale OrderDescending}"
|
||||||
|
GroupName="Order"
|
||||||
|
IsChecked="{Binding !SortingAscending, Mode=OneTime}"
|
||||||
|
Tag="Descending" />
|
||||||
|
</StackPanel>
|
||||||
|
</Flyout>
|
||||||
|
</DropDownButton.Flyout>
|
||||||
|
</DropDownButton>
|
||||||
<TextBox
|
<TextBox
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
MinHeight="29"
|
Width="200"
|
||||||
MaxHeight="29"
|
MaxWidth="200"
|
||||||
Margin="5 0 5 0"
|
Margin="5,0,0,0"
|
||||||
HorizontalAlignment="Stretch"
|
VerticalAlignment="Center"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
Watermark="{ext:Locale Search}"
|
Watermark="{ext:Locale Search}"
|
||||||
Text="{Binding Search}" />
|
Text="{Binding Search}" />
|
||||||
<StackPanel
|
</StackPanel>
|
||||||
Grid.Column="2"
|
</Grid>
|
||||||
Orientation="Horizontal">
|
|
||||||
<Button
|
|
||||||
Name="SelectDisplayedButton"
|
|
||||||
MinWidth="90"
|
|
||||||
Margin="5"
|
|
||||||
Command="{Binding SelectDisplayed}">
|
|
||||||
<TextBlock Text="{ext:Locale XCITrimmerSelectDisplayed}" />
|
|
||||||
</Button>
|
|
||||||
<Button
|
|
||||||
Name="DeselectDisplayedButton"
|
|
||||||
MinWidth="90"
|
|
||||||
Margin="5"
|
|
||||||
Command="{Binding DeselectDisplayed}">
|
|
||||||
<TextBlock Text="{ext:Locale XCITrimmerDeselectDisplayed}" />
|
|
||||||
</Button>
|
|
||||||
</StackPanel>
|
|
||||||
</Grid>
|
|
||||||
</Panel>
|
|
||||||
<Border
|
<Border
|
||||||
Grid.Row="2"
|
Grid.Row="2"
|
||||||
Margin="0 0 0 10"
|
Margin="0,0,0,20"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
VerticalAlignment="Stretch"
|
VerticalAlignment="Stretch"
|
||||||
BorderBrush="{DynamicResource AppListHoverBackgroundColor}"
|
BorderBrush="{DynamicResource AppListHoverBackgroundColor}"
|
||||||
|
|
@ -124,122 +123,99 @@
|
||||||
SelectedItems="{Binding SelectedDisplayedXCIFiles, Mode=OneWay}"
|
SelectedItems="{Binding SelectedDisplayedXCIFiles, Mode=OneWay}"
|
||||||
ItemsSource="{Binding DisplayedXCIFiles}"
|
ItemsSource="{Binding DisplayedXCIFiles}"
|
||||||
IsEnabled="{Binding !Processing}">
|
IsEnabled="{Binding !Processing}">
|
||||||
<ListBox.DataTemplates>
|
|
||||||
<DataTemplate
|
|
||||||
DataType="models:XCITrimmerFileModel">
|
|
||||||
<Panel Margin="10">
|
|
||||||
<Grid ColumnDefinitions="65*,35*">
|
|
||||||
<TextBlock
|
|
||||||
Grid.Column="0"
|
|
||||||
Margin="10 0 10 0"
|
|
||||||
HorizontalAlignment="Left"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
MaxLines="2"
|
|
||||||
TextWrapping="Wrap"
|
|
||||||
TextTrimming="CharacterEllipsis"
|
|
||||||
Text="{Binding Name}">
|
|
||||||
</TextBlock>
|
|
||||||
<Grid Grid.Column="1" ColumnDefinitions="45*,55*">
|
|
||||||
<ProgressBar
|
|
||||||
Height="10"
|
|
||||||
Margin="10 0 10 0"
|
|
||||||
HorizontalAlignment="Stretch"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
CornerRadius="5"
|
|
||||||
IsVisible="{Binding $parent[UserControl].((viewModels:XciTrimmerViewModel)DataContext).Processing}"
|
|
||||||
Maximum="100"
|
|
||||||
Minimum="0"
|
|
||||||
Value="{Binding PercentageProgress}" />
|
|
||||||
<TextBlock
|
|
||||||
Grid.Column="0"
|
|
||||||
Margin="10 0 10 0"
|
|
||||||
HorizontalAlignment="Left"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
MaxLines="1"
|
|
||||||
Text="{Binding ., Converter={x:Static helpers:XCITrimmerFileStatusConverter.Instance}}">
|
|
||||||
<ToolTip.Tip>
|
|
||||||
<StackPanel
|
|
||||||
IsVisible="{Binding IsFailed}">
|
|
||||||
<TextBlock
|
|
||||||
Classes="h1"
|
|
||||||
Text="{ext:Locale XCITrimmerTitleStatusFailed}" />
|
|
||||||
<TextBlock
|
|
||||||
Text="{Binding ., Converter={x:Static helpers:XCITrimmerFileStatusDetailConverter.Instance}}"
|
|
||||||
MaxLines="5"
|
|
||||||
MaxWidth="200"
|
|
||||||
MaxHeight="100"
|
|
||||||
TextTrimming="None"
|
|
||||||
TextWrapping="Wrap"/>
|
|
||||||
</StackPanel>
|
|
||||||
</ToolTip.Tip>
|
|
||||||
</TextBlock>
|
|
||||||
<TextBlock
|
|
||||||
Grid.Column="1"
|
|
||||||
Margin="10 0 10 0"
|
|
||||||
HorizontalAlignment="Left"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
MaxLines="1"
|
|
||||||
Text="{Binding ., Converter={x:Static helpers:XCITrimmerFileSpaceSavingsConverter.Instance}}">>
|
|
||||||
</TextBlock>
|
|
||||||
</Grid>
|
|
||||||
</Grid>
|
|
||||||
</Panel>
|
|
||||||
</DataTemplate>
|
|
||||||
</ListBox.DataTemplates>
|
|
||||||
<ListBox.Styles>
|
<ListBox.Styles>
|
||||||
<Style Selector="ListBoxItem">
|
<Style Selector="ListBoxItem">
|
||||||
|
<Setter Property="Margin" Value="0" />
|
||||||
<Setter Property="Background" Value="Transparent" />
|
<Setter Property="Background" Value="Transparent" />
|
||||||
</Style>
|
</Style>
|
||||||
</ListBox.Styles>
|
</ListBox.Styles>
|
||||||
|
<ListBox.DataTemplates>
|
||||||
|
<DataTemplate
|
||||||
|
DataType="models:XCITrimmerFileModel">
|
||||||
|
<Grid ColumnDefinitions="65*,50*">
|
||||||
|
<TextBlock
|
||||||
|
Grid.Column="0"
|
||||||
|
Margin="10,0,10,0"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
MaxLines="2"
|
||||||
|
TextWrapping="Wrap"
|
||||||
|
TextTrimming="CharacterEllipsis"
|
||||||
|
Text="{Binding Name}">
|
||||||
|
</TextBlock>
|
||||||
|
<Grid Grid.Column="1" ColumnDefinitions="50*,90*">
|
||||||
|
<ProgressBar
|
||||||
|
Height="10"
|
||||||
|
Margin="10,0,10,0"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
CornerRadius="5"
|
||||||
|
IsVisible="{Binding $parent[UserControl].((viewModels:XciTrimmerViewModel)DataContext).Processing}"
|
||||||
|
Maximum="100"
|
||||||
|
Minimum="0"
|
||||||
|
Value="{Binding PercentageProgress}" />
|
||||||
|
<TextBlock
|
||||||
|
Grid.Column="0"
|
||||||
|
Margin="10,0,10,0"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
MaxLines="1"
|
||||||
|
Text="{Binding ., Converter={x:Static helpers:XCITrimmerFileStatusConverter.Instance}}">
|
||||||
|
<ToolTip.Tip>
|
||||||
|
<StackPanel
|
||||||
|
IsVisible="{Binding IsFailed}">
|
||||||
|
<TextBlock
|
||||||
|
Classes="h1"
|
||||||
|
Text="{ext:Locale XCITrimmerTitleStatusFailed}" />
|
||||||
|
<TextBlock
|
||||||
|
Text="{Binding ., Converter={x:Static helpers:XCITrimmerFileStatusDetailConverter.Instance}}"
|
||||||
|
MaxLines="5"
|
||||||
|
MaxWidth="200"
|
||||||
|
MaxHeight="100"
|
||||||
|
TextTrimming="None"
|
||||||
|
TextWrapping="Wrap"/>
|
||||||
|
</StackPanel>
|
||||||
|
</ToolTip.Tip>
|
||||||
|
</TextBlock>
|
||||||
|
<TextBlock
|
||||||
|
Grid.Column="1"
|
||||||
|
Margin="10,0,10,0"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
MaxLines="1"
|
||||||
|
Text="{Binding ., Converter={x:Static helpers:XCITrimmerFileSpaceSavingsConverter.Instance}}">
|
||||||
|
</TextBlock>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
</DataTemplate>
|
||||||
|
</ListBox.DataTemplates>
|
||||||
</ListBox>
|
</ListBox>
|
||||||
</Border>
|
</Border>
|
||||||
<Border
|
<StackPanel Grid.Row="3" Margin="0,0,0,20" Spacing="5" HorizontalAlignment="Center" VerticalAlignment="Center" Orientation="Horizontal">
|
||||||
Grid.Row="3"
|
<TextBlock
|
||||||
Margin="0 0 0 10"
|
Classes="h1"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Center"
|
||||||
BorderBrush="{DynamicResource AppListHoverBackgroundColor}"
|
VerticalAlignment="Center"
|
||||||
BorderThickness="1"
|
MaxLines="1"
|
||||||
CornerRadius="5"
|
Text="{ext:Locale XCITrimmerTotalSavings}" />
|
||||||
Padding="2.5">
|
<TextBlock
|
||||||
<Grid ColumnDefinitions="Auto,*" RowDefinitions="Auto,Auto">
|
Classes="h1"
|
||||||
<TextBlock
|
HorizontalAlignment="Center"
|
||||||
Grid.Column="0"
|
VerticalAlignment="Center"
|
||||||
Grid.Row="0"
|
FontWeight="Regular"
|
||||||
Classes="h1"
|
MaxLines="1"
|
||||||
Margin="5"
|
Text="{Binding ActualSavings}" />
|
||||||
HorizontalAlignment="Right"
|
<TextBlock
|
||||||
VerticalAlignment="Center"
|
Classes="h1"
|
||||||
MaxLines="1"
|
HorizontalAlignment="Center"
|
||||||
Text="{ext:Locale XCITrimmerPotentialSavings}" />
|
VerticalAlignment="Center"
|
||||||
<TextBlock
|
FontWeight="Regular"
|
||||||
Grid.Column="0"
|
MaxLines="1"
|
||||||
Grid.Row="1"
|
Text="{Binding SavingsDifference}" />
|
||||||
Classes="h1"
|
</StackPanel>
|
||||||
Margin="5"
|
|
||||||
HorizontalAlignment="Right"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
MaxLines="1"
|
|
||||||
Text="{ext:Locale XCITrimmerActualSavings}" />
|
|
||||||
<TextBlock
|
|
||||||
Grid.Column="1"
|
|
||||||
Grid.Row="0"
|
|
||||||
Margin="5"
|
|
||||||
HorizontalAlignment="Left"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
MaxLines="1"
|
|
||||||
Text="{Binding PotentialSavings}" />
|
|
||||||
<TextBlock
|
|
||||||
Grid.Column="1"
|
|
||||||
Grid.Row="1"
|
|
||||||
Margin="5"
|
|
||||||
HorizontalAlignment="Left"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
MaxLines="1"
|
|
||||||
Text="{Binding ActualSavings}" />
|
|
||||||
</Grid>
|
|
||||||
</Border>
|
|
||||||
<Panel
|
<Panel
|
||||||
Grid.Row="4"
|
Grid.Row="4"
|
||||||
|
Margin="0,10,0,0"
|
||||||
HorizontalAlignment="Stretch">
|
HorizontalAlignment="Stretch">
|
||||||
<Grid ColumnDefinitions="*,Auto">
|
<Grid ColumnDefinitions="*,Auto">
|
||||||
<StackPanel
|
<StackPanel
|
||||||
|
|
@ -250,7 +226,6 @@
|
||||||
<Button
|
<Button
|
||||||
Name="TrimButton"
|
Name="TrimButton"
|
||||||
MinWidth="90"
|
MinWidth="90"
|
||||||
Margin="5"
|
|
||||||
Click="Trim"
|
Click="Trim"
|
||||||
IsEnabled="{Binding CanTrim}">
|
IsEnabled="{Binding CanTrim}">
|
||||||
<TextBlock Text="{ext:Locale XCITrimmerTrim}" />
|
<TextBlock Text="{ext:Locale XCITrimmerTrim}" />
|
||||||
|
|
@ -258,7 +233,6 @@
|
||||||
<Button
|
<Button
|
||||||
Name="UntrimButton"
|
Name="UntrimButton"
|
||||||
MinWidth="90"
|
MinWidth="90"
|
||||||
Margin="5"
|
|
||||||
Click="Untrim"
|
Click="Untrim"
|
||||||
IsEnabled="{Binding CanUntrim}">
|
IsEnabled="{Binding CanUntrim}">
|
||||||
<TextBlock Text="{ext:Locale XCITrimmerUntrim}" />
|
<TextBlock Text="{ext:Locale XCITrimmerUntrim}" />
|
||||||
|
|
@ -272,7 +246,6 @@
|
||||||
<Button
|
<Button
|
||||||
Name="CancellingButton"
|
Name="CancellingButton"
|
||||||
MinWidth="90"
|
MinWidth="90"
|
||||||
Margin="5"
|
|
||||||
Click="Cancel"
|
Click="Cancel"
|
||||||
IsEnabled="False">
|
IsEnabled="False">
|
||||||
<Button.IsVisible>
|
<Button.IsVisible>
|
||||||
|
|
@ -286,7 +259,6 @@
|
||||||
<Button
|
<Button
|
||||||
Name="CancelButton"
|
Name="CancelButton"
|
||||||
MinWidth="90"
|
MinWidth="90"
|
||||||
Margin="5"
|
|
||||||
Click="Cancel">
|
Click="Cancel">
|
||||||
<Button.IsVisible>
|
<Button.IsVisible>
|
||||||
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||||
|
|
@ -299,10 +271,9 @@
|
||||||
<Button
|
<Button
|
||||||
Name="CloseButton"
|
Name="CloseButton"
|
||||||
MinWidth="90"
|
MinWidth="90"
|
||||||
Margin="5"
|
|
||||||
Click="Close"
|
Click="Close"
|
||||||
IsVisible="{Binding !Processing}">
|
IsVisible="{Binding !Processing}">
|
||||||
<TextBlock Text="{ext:Locale InputDialogClose}" />
|
<TextBlock Text="{ext:Locale SettingsButtonClose}" />
|
||||||
</Button>
|
</Button>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ namespace Ryujinx.Ava.UI.Views.Dialog
|
||||||
{
|
{
|
||||||
ViewModel = new XciTrimmerViewModel(RyujinxApp.MainWindow.ViewModel)
|
ViewModel = new XciTrimmerViewModel(RyujinxApp.MainWindow.ViewModel)
|
||||||
},
|
},
|
||||||
Title = LocaleManager.Instance[LocaleKeys.XCITrimmerWindowTitle]
|
Title = LocaleManager.Instance[LocaleKeys.MenuBarActionsXCITrimmer]
|
||||||
};
|
};
|
||||||
|
|
||||||
Style bottomBorder = new(x => x.OfType<Grid>().Name("DialogSpace").Child().OfType<Border>());
|
Style bottomBorder = new(x => x.OfType<Grid>().Name("DialogSpace").Child().OfType<Border>());
|
||||||
|
|
|
||||||
|
|
@ -166,7 +166,7 @@
|
||||||
Icon="{ext:Icon fa-solid fa-stop}"
|
Icon="{ext:Icon fa-solid fa-stop}"
|
||||||
InputGesture="Escape"
|
InputGesture="Escape"
|
||||||
IsEnabled="{Binding IsGameRunning}" />
|
IsEnabled="{Binding IsGameRunning}" />
|
||||||
<MenuItem Command="{Binding SimulateWakeUpMessage}" Header="{ext:Locale MenuBarOptionsSimulateWakeUpMessage}" Icon="{ext:Icon fa-solid fa-sun}" />
|
<MenuItem Command="{Binding SimulateWakeUpMessage}" Header="{ext:Locale MenuBarOptionsSimulateWakeUpMessage}" Icon="{ext:Icon fa-solid fa-sun}" InputGesture="Ctrl+M" />
|
||||||
<Separator />
|
<Separator />
|
||||||
<MenuItem
|
<MenuItem
|
||||||
Command="{Binding OpenAmiiboWindow}"
|
Command="{Binding OpenAmiiboWindow}"
|
||||||
|
|
@ -176,7 +176,7 @@
|
||||||
InputGesture="Ctrl + A"
|
InputGesture="Ctrl + A"
|
||||||
IsEnabled="{Binding IsAmiiboRequested}" />
|
IsEnabled="{Binding IsAmiiboRequested}" />
|
||||||
<MenuItem
|
<MenuItem
|
||||||
Command="{Binding OpenBinFile}"
|
Command="{Binding OpenAmiiboBinFile}"
|
||||||
AttachedToVisualTree="ScanBinAmiiboMenuItem_AttachedToVisualTree"
|
AttachedToVisualTree="ScanBinAmiiboMenuItem_AttachedToVisualTree"
|
||||||
Header="{ext:Locale MenuBarActionsScanAmiiboBin}"
|
Header="{ext:Locale MenuBarActionsScanAmiiboBin}"
|
||||||
Icon="{ext:Icon fa-solid fa-cube}"
|
Icon="{ext:Icon fa-solid fa-cube}"
|
||||||
|
|
@ -196,20 +196,21 @@
|
||||||
InputGesture="{Binding ShowUiKey}"
|
InputGesture="{Binding ShowUiKey}"
|
||||||
IsEnabled="{Binding IsGameRunning}" />
|
IsEnabled="{Binding IsGameRunning}" />
|
||||||
<MenuItem
|
<MenuItem
|
||||||
Name="CheatManagerMenuItem"
|
Command="{Binding OpenCheatManagerForCurrentApp}"
|
||||||
Header="{ext:Locale GameListContextMenuManageCheat}"
|
Header="{ext:Locale GameListContextMenuManageCheat}"
|
||||||
Icon="{ext:Icon fa-solid fa-code}"
|
Icon="{ext:Icon fa-solid fa-code}"
|
||||||
|
InputGesture="Ctrl + C"
|
||||||
IsEnabled="{Binding IsGameRunning}" />
|
IsEnabled="{Binding IsGameRunning}" />
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem VerticalAlignment="Center" Header="{ext:Locale MenuBarActions}" IsVisible="{Binding EnableNonGameRunningControls}">
|
<MenuItem VerticalAlignment="Center" Header="{ext:Locale MenuBarActions}" IsVisible="{Binding EnableNonGameRunningControls}">
|
||||||
<MenuItem Header="{ext:Locale MenuBarActionsInstallKeys}" Icon="{ext:Icon fa-solid fa-key}">
|
|
||||||
<MenuItem Command="{Binding InstallKeysFromFile}" Header="{ext:Locale MenuBarFileActionsInstallKeysFromFile}" Icon="{ext:Icon fa-solid fa-file-code}" />
|
|
||||||
<MenuItem Command="{Binding InstallKeysFromFolder}" Header="{ext:Locale MenuBarFileActionsInstallKeysFromFolder}" Icon="{ext:Icon fa-solid fa-folder-closed}" />
|
|
||||||
</MenuItem>
|
|
||||||
<MenuItem Header="{ext:Locale MenuBarActionsInstallFirmware}" Icon="{ext:Icon fa-solid fa-floppy-disk}">
|
<MenuItem Header="{ext:Locale MenuBarActionsInstallFirmware}" Icon="{ext:Icon fa-solid fa-floppy-disk}">
|
||||||
<MenuItem Command="{Binding InstallFirmwareFromFile}" Header="{ext:Locale MenuBarActionsInstallFirmwareFromFile}" Icon="{ext:Icon fa-solid fa-file-code}" />
|
<MenuItem Command="{Binding InstallFirmwareFromFile}" Header="{ext:Locale MenuBarActionsInstallFirmwareFromFile}" Icon="{ext:Icon fa-solid fa-file-code}" />
|
||||||
<MenuItem Command="{Binding InstallFirmwareFromFolder}" Header="{ext:Locale MenuBarActionsInstallFirmwareFromDirectory}" Icon="{ext:Icon fa-solid fa-folder-closed}" />
|
<MenuItem Command="{Binding InstallFirmwareFromFolder}" Header="{ext:Locale MenuBarActionsInstallFirmwareFromDirectory}" Icon="{ext:Icon fa-solid fa-folder-closed}" />
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
|
<MenuItem Header="{ext:Locale MenuBarActionsInstallKeys}" Icon="{ext:Icon fa-solid fa-key}">
|
||||||
|
<MenuItem Command="{Binding InstallKeysFromFile}" Header="{ext:Locale MenuBarFileActionsInstallKeysFromFile}" Icon="{ext:Icon fa-solid fa-file-code}" />
|
||||||
|
<MenuItem Command="{Binding InstallKeysFromFolder}" Header="{ext:Locale MenuBarFileActionsInstallKeysFromFolder}" Icon="{ext:Icon fa-solid fa-folder-closed}" />
|
||||||
|
</MenuItem>
|
||||||
<MenuItem Header="{ext:Locale MenuBarActionsManageFileTypes}" IsVisible="{Binding ManageFileTypesVisible}" Icon="{ext:Icon fa-solid fa-clipboard}">
|
<MenuItem Header="{ext:Locale MenuBarActionsManageFileTypes}" IsVisible="{Binding ManageFileTypesVisible}" Icon="{ext:Icon fa-solid fa-clipboard}">
|
||||||
<MenuItem Name="InstallFileTypesMenuItem" Header="{ext:Locale MenuBarActionsInstallFileTypes}" IsEnabled="{Binding AreMimeTypesRegistered, Converter={x:Static BoolConverters.Not}}" Icon="{ext:Icon fa-solid fa-square-plus}" />
|
<MenuItem Name="InstallFileTypesMenuItem" Header="{ext:Locale MenuBarActionsInstallFileTypes}" IsEnabled="{Binding AreMimeTypesRegistered, Converter={x:Static BoolConverters.Not}}" Icon="{ext:Icon fa-solid fa-square-plus}" />
|
||||||
<MenuItem Name="UninstallFileTypesMenuItem" Header="{ext:Locale MenuBarActionsUninstallFileTypes}" IsEnabled="{Binding AreMimeTypesRegistered}" Icon="{ext:Icon fa-solid fa-square-minus}" />
|
<MenuItem Name="UninstallFileTypesMenuItem" Header="{ext:Locale MenuBarActionsUninstallFileTypes}" IsEnabled="{Binding AreMimeTypesRegistered}" Icon="{ext:Icon fa-solid fa-square-minus}" />
|
||||||
|
|
@ -217,8 +218,8 @@
|
||||||
<Separator />
|
<Separator />
|
||||||
<MenuItem Header="{ext:Locale MenuBarActionsTools}" Icon="{ext:Icon fa-solid fa-toolbox}">
|
<MenuItem Header="{ext:Locale MenuBarActionsTools}" Icon="{ext:Icon fa-solid fa-toolbox}">
|
||||||
<MenuItem
|
<MenuItem
|
||||||
Name="MiiAppletMenuItem" Header="{ext:Locale MenuBarActionsOpenMiiEditor}" Icon="{ext:Icon fa-solid fa-face-grin-wide}" ToolTip.Tip="{ext:Locale MenuBarActionsOpenMiiEditorToolTip}" />
|
Name="MiiAppletMenuItem" Header="{ext:Locale MenuBarActionsOpenMiiEditor}" Icon="{ext:Icon fa-solid fa-face-grin-wide}" />
|
||||||
<MenuItem Name="XciTrimmerMenuItem" Header="{ext:Locale MenuBarActionsXCITrimmer}" Icon="{ext:Icon fa-solid fa-scissors}" />
|
<MenuItem Name="XciTrimmerMenuItem" Header="{ext:Locale MenuBarActionsXCITrimmer}" Icon="{ext:Icon fa-solid fa-scissors}" ToolTip.Tip="{ext:Locale MenuBarActionsXCITrimmerTooltip}" />
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem VerticalAlignment="Center" Header="{ext:Locale MenuBarView}">
|
<MenuItem VerticalAlignment="Center" Header="{ext:Locale MenuBarView}">
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,6 @@ namespace Ryujinx.Ava.UI.Views.Main
|
||||||
PauseEmulationMenuItem.Command = Commands.Create(() => ViewModel.AppHost?.Pause());
|
PauseEmulationMenuItem.Command = Commands.Create(() => ViewModel.AppHost?.Pause());
|
||||||
ResumeEmulationMenuItem.Command = Commands.Create(() => ViewModel.AppHost?.Resume());
|
ResumeEmulationMenuItem.Command = Commands.Create(() => ViewModel.AppHost?.Resume());
|
||||||
StopEmulationMenuItem.Command = Commands.Create(() => ViewModel.AppHost?.ShowExitPrompt().OrCompleted());
|
StopEmulationMenuItem.Command = Commands.Create(() => ViewModel.AppHost?.ShowExitPrompt().OrCompleted());
|
||||||
CheatManagerMenuItem.Command = Commands.CreateSilentFail(OpenCheatManagerForCurrentApp);
|
|
||||||
InstallFileTypesMenuItem.Command = Commands.Create(InstallFileTypes);
|
InstallFileTypesMenuItem.Command = Commands.Create(InstallFileTypes);
|
||||||
UninstallFileTypesMenuItem.Command = Commands.Create(UninstallFileTypes);
|
UninstallFileTypesMenuItem.Command = Commands.Create(UninstallFileTypes);
|
||||||
XciTrimmerMenuItem.Command = Commands.Create(XciTrimmerView.Show);
|
XciTrimmerMenuItem.Command = Commands.Create(XciTrimmerView.Show);
|
||||||
|
|
@ -166,7 +165,7 @@ namespace Ryujinx.Ava.UI.Views.Main
|
||||||
ViewModel.LoadConfigurableHotKeys();
|
ViewModel.LoadConfigurableHotKeys();
|
||||||
}
|
}
|
||||||
|
|
||||||
public AppletMetadata MiiApplet => new(ViewModel.ContentManager, "miiEdit", 0x0100000000001009);
|
public AppletMetadata MiiApplet => new(ViewModel.ContentManager, LocaleManager.Instance[LocaleKeys.MenuBarActionsOpenMiiEditor], 0x0100000000001009);
|
||||||
|
|
||||||
public async Task OpenMiiApplet()
|
public async Task OpenMiiApplet()
|
||||||
{
|
{
|
||||||
|
|
@ -176,24 +175,6 @@ namespace Ryujinx.Ava.UI.Views.Main
|
||||||
await ViewModel.LoadApplication(appData, ViewModel.IsFullScreen || ViewModel.StartGamesInFullscreen, nacpData);
|
await ViewModel.LoadApplication(appData, ViewModel.IsFullScreen || ViewModel.StartGamesInFullscreen, nacpData);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task OpenCheatManagerForCurrentApp()
|
|
||||||
{
|
|
||||||
if (!ViewModel.IsGameRunning)
|
|
||||||
return;
|
|
||||||
|
|
||||||
string name = ViewModel.AppHost.Device.Processes.ActiveApplication.ApplicationControlProperties.Title[(int)ViewModel.AppHost.Device.System.State.DesiredTitleLanguage].NameString.ToString();
|
|
||||||
|
|
||||||
await StyleableAppWindow.ShowAsync(
|
|
||||||
new CheatWindow(
|
|
||||||
Window.VirtualFileSystem,
|
|
||||||
ViewModel.AppHost.Device.Processes.ActiveApplication.ProgramIdText,
|
|
||||||
name,
|
|
||||||
ViewModel.SelectedApplication.Path)
|
|
||||||
);
|
|
||||||
|
|
||||||
ViewModel.AppHost.Device.EnableCheats();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ScanAmiiboMenuItem_AttachedToVisualTree(object sender, VisualTreeAttachmentEventArgs e)
|
private void ScanAmiiboMenuItem_AttachedToVisualTree(object sender, VisualTreeAttachmentEventArgs e)
|
||||||
{
|
{
|
||||||
if (sender is MenuItem)
|
if (sender is MenuItem)
|
||||||
|
|
|
||||||
|
|
@ -24,21 +24,21 @@
|
||||||
<viewModels:AmiiboWindowViewModel />
|
<viewModels:AmiiboWindowViewModel />
|
||||||
</Design.DataContext>
|
</Design.DataContext>
|
||||||
<Grid RowDefinitions="Auto,Auto,*,Auto" Margin="15" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" >
|
<Grid RowDefinitions="Auto,Auto,*,Auto" Margin="15" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" >
|
||||||
<Grid Name="FlushControls" ColumnDefinitions="Auto,Auto" Grid.Row="1" Margin="-15">
|
<Grid Name="FlushControls" ColumnDefinitions="Auto,Auto" Grid.Row="0" Margin="-15">
|
||||||
<controls:RyujinxLogo
|
<controls:RyujinxLogo
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
VerticalAlignment="Top"
|
VerticalAlignment="Top"
|
||||||
Margin="8, 8, 7, 0"
|
Margin="7, 7, 0, 0"
|
||||||
ToolTip.Tip="{ext:WindowTitle Amiibo}" />
|
ToolTip.Tip="{ext:WindowTitle Amiibo}" />
|
||||||
<StackPanel Grid.Column="1" Orientation="Horizontal" Margin="0, 0, 0, 20">
|
<StackPanel Grid.Column="1" Orientation="Horizontal">
|
||||||
<StackPanel Spacing="10" Orientation="Horizontal" HorizontalAlignment="Left">
|
<StackPanel Spacing="10" Orientation="Horizontal" HorizontalAlignment="Left">
|
||||||
<TextBlock VerticalAlignment="Center" Text="{ext:Locale AmiiboSeriesLabel}" />
|
<TextBlock Margin="0,40,0,15" VerticalAlignment="Center" Text="{ext:Locale AmiiboSeriesLabel}" />
|
||||||
<ComboBox Margin="0, 8, 0, 0" SelectedIndex="{Binding SeriesSelectedIndex}" ItemsSource="{Binding AmiiboSeries}" MinWidth="100" />
|
<ComboBox Margin="0,40,0,15" SelectedIndex="{Binding SeriesSelectedIndex}" ItemsSource="{Binding AmiiboSeries}" MinWidth="100" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid Name="NormalControls" ColumnDefinitions="*,*" Grid.Row="1" HorizontalAlignment="Stretch" >
|
<Grid Margin="20,0,0,0" Name="NormalControls" ColumnDefinitions="*,*" Grid.Row="1" HorizontalAlignment="Stretch" >
|
||||||
<StackPanel Spacing="10" Orientation="Horizontal" HorizontalAlignment="Left">
|
<StackPanel Spacing="10" Orientation="Horizontal" HorizontalAlignment="Left">
|
||||||
<TextBlock VerticalAlignment="Center" Text="{ext:Locale AmiiboSeriesLabel}" />
|
<TextBlock VerticalAlignment="Center" Text="{ext:Locale AmiiboSeriesLabel}" />
|
||||||
<ComboBox SelectedIndex="{Binding SeriesSelectedIndex}" ItemsSource="{Binding AmiiboSeries}" MinWidth="100" />
|
<ComboBox SelectedIndex="{Binding SeriesSelectedIndex}" ItemsSource="{Binding AmiiboSeries}" MinWidth="100" />
|
||||||
|
|
@ -49,18 +49,18 @@
|
||||||
DockPanel.Dock="Left"
|
DockPanel.Dock="Left"
|
||||||
Width="300"
|
Width="300"
|
||||||
Margin="20"
|
Margin="20"
|
||||||
|
Padding="10"
|
||||||
SelectionMode="Single"
|
SelectionMode="Single"
|
||||||
ItemsSource="{Binding AmiiboList}"
|
ItemsSource="{Binding AmiiboList}"
|
||||||
SelectedIndex="{Binding AmiiboSelectedIndex}">
|
SelectedIndex="{Binding AmiiboSelectedIndex}">
|
||||||
|
|
||||||
<ListBox.ItemTemplate>
|
<ListBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<TextBlock Margin="10, 0, 0 ,0" Text="{Binding Name}" />
|
<TextBlock Margin="10,0,0,0" Text="{Binding Name}" />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ListBox.ItemTemplate>
|
</ListBox.ItemTemplate>
|
||||||
</ListBox>
|
</ListBox>
|
||||||
<StackPanel Margin="20">
|
<StackPanel Margin="20">
|
||||||
<Image Source="{Binding AmiiboImage}" Height="350" Width="150" HorizontalAlignment="Center" />
|
<Image Source="{Binding AmiiboImage}" Height="400" Width="200" HorizontalAlignment="Center" />
|
||||||
<ScrollViewer MaxHeight="120" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto"
|
<ScrollViewer MaxHeight="120" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto"
|
||||||
Margin="20" VerticalAlignment="Top" HorizontalAlignment="Stretch">
|
Margin="20" VerticalAlignment="Top" HorizontalAlignment="Stretch">
|
||||||
<TextBlock TextWrapping="Wrap" Text="{Binding Usage}" HorizontalAlignment="Center"
|
<TextBlock TextWrapping="Wrap" Text="{Binding Usage}" HorizontalAlignment="Center"
|
||||||
|
|
@ -68,17 +68,15 @@
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
<Grid Grid.Row="3" ColumnDefinitions="Auto,Auto,*,Auto,Auto">
|
<Grid Grid.Row="3" Margin="10,0,0,0" ColumnDefinitions="Auto,Auto,*,Auto,Auto">
|
||||||
<CheckBox Margin="10" Grid.Column="0" VerticalContentAlignment="Center"
|
<CheckBox Margin="10" Grid.Column="0" IsChecked="{Binding ShowAllAmiibo}" >
|
||||||
IsChecked="{Binding ShowAllAmiibo}"
|
<TextBlock Text="{ext:Locale AmiiboOptionsShowAllLabel}" />
|
||||||
Content="{ext:Locale AmiiboOptionsShowAllLabel}" />
|
</CheckBox>
|
||||||
<CheckBox HotKey="H"
|
<CheckBox HotKey="H" Margin="0,10,10,10" Grid.Column="1" IsChecked="{Binding UseRandomUuid}" >
|
||||||
Margin="10" VerticalContentAlignment="Center" Grid.Column="1"
|
<TextBlock Text="{ext:Locale AmiiboOptionsUsRandomTagLabel}" />
|
||||||
IsChecked="{Binding UseRandomUuid}"
|
</CheckBox>
|
||||||
Content="{ext:Locale AmiiboOptionsUsRandomTagLabel}" />
|
|
||||||
<Button Grid.Column="3"
|
<Button Grid.Column="3"
|
||||||
IsEnabled="{Binding EnableScanning}"
|
IsEnabled="{Binding EnableScanning}"
|
||||||
Width="80"
|
|
||||||
Name="ScanButton"
|
Name="ScanButton"
|
||||||
HotKey="Return"
|
HotKey="Return"
|
||||||
Content="{ext:Locale AmiiboScanButtonLabel}"
|
Content="{ext:Locale AmiiboScanButtonLabel}"
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,9 @@
|
||||||
<KeyBinding Gesture="F9" Command="{Binding ToggleDockMode}" />
|
<KeyBinding Gesture="F9" Command="{Binding ToggleDockMode}" />
|
||||||
<KeyBinding Gesture="Escape" Command="{Binding ExitCurrentState}" />
|
<KeyBinding Gesture="Escape" Command="{Binding ExitCurrentState}" />
|
||||||
<KeyBinding Gesture="Ctrl+A" Command="{Binding OpenAmiiboWindow}" />
|
<KeyBinding Gesture="Ctrl+A" Command="{Binding OpenAmiiboWindow}" />
|
||||||
<KeyBinding Gesture="Ctrl+B" Command="{Binding OpenBinFile}" />
|
<KeyBinding Gesture="Ctrl+B" Command="{Binding OpenAmiiboBinFile}" />
|
||||||
|
<KeyBinding Gesture="Ctrl+C" Command="{Binding OpenCheatManagerForCurrentApp}" />
|
||||||
|
<KeyBinding Gesture="Ctrl+M" Command="{Binding SimulateWakeUpMessage}" />
|
||||||
</Window.KeyBindings>
|
</Window.KeyBindings>
|
||||||
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" RowDefinitions="*">
|
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" RowDefinitions="*">
|
||||||
<helpers:OffscreenTextBox IsEnabled="False" Opacity="0" Name="HiddenTextBox" IsHitTestVisible="False" IsTabStop="False" />
|
<helpers:OffscreenTextBox IsEnabled="False" Opacity="0" Name="HiddenTextBox" IsHitTestVisible="False" IsTabStop="False" />
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue