mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-12-11 01:37:01 +00:00
Compare commits
26 commits
78a7f8c6a1
...
6a4984dbff
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6a4984dbff | ||
|
|
f15a1148a4 | ||
|
|
8cef34450b | ||
|
|
90b5ce0aaf | ||
|
|
b5db83c6b0 | ||
|
|
57d5804d3a | ||
|
|
ed8cda4b0e | ||
|
|
39653c5250 | ||
|
|
4e96310012 | ||
|
|
d67d96ebaa | ||
|
|
f1b92344fc | ||
|
|
ac4448d2d7 | ||
|
|
9f7b7ee4ee | ||
|
|
4e0de8adab | ||
|
|
c5f4a47184 | ||
|
|
d1a15251db | ||
|
|
5c5d324b6b | ||
|
|
944efa740a | ||
|
|
ef851bc26f | ||
|
|
7ead334d0c | ||
|
|
8af1f5e1dc | ||
|
|
8289614433 | ||
|
|
d7cdb5770d | ||
|
|
0bb85249a8 | ||
|
|
8b74344f62 | ||
|
|
c065a7676b |
11 changed files with 1268 additions and 1378 deletions
1952
assets/locales.json
1952
assets/locales.json
File diff suppressed because it is too large
Load diff
|
|
@ -105,8 +105,8 @@
|
|||
CommandParameter="{Binding}"
|
||||
Header="{ext:Locale GameListContextMenuTrimXCI}"
|
||||
IsEnabled="{Binding TrimXCIEnabled}"
|
||||
Icon="{ext:Icon fa-solid fa-scissors}"
|
||||
ToolTip.Tip="{ext:Locale GameListContextMenuTrimXCIToolTip}" />
|
||||
IsVisible="{Binding IsXCIFile}"
|
||||
Icon="{ext:Icon fa-solid fa-scissors}" />
|
||||
<MenuItem Header="{ext:Locale GameListContextMenuCacheManagement}" Icon="{ext:Icon fa-solid fa-memory}">
|
||||
<MenuItem
|
||||
Command="{Binding PurgePtcCache}"
|
||||
|
|
|
|||
|
|
@ -317,40 +317,43 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||
_amiiboSeries.Clear();
|
||||
_amiibos.Clear();
|
||||
|
||||
for (int i = 0; i < _amiiboList.Count; i++)
|
||||
foreach (var amiibo in _amiiboList)
|
||||
{
|
||||
if (!_amiiboSeries.Contains(_amiiboList[i].AmiiboSeries))
|
||||
if (!_amiiboSeries.Contains(amiibo.AmiiboSeries))
|
||||
{
|
||||
if (!ShowAllAmiibo)
|
||||
{
|
||||
foreach (AmiiboApiGamesSwitch game in _amiiboList[i].GamesSwitch)
|
||||
bool compatible = amiibo.GamesSwitch.Any(game => game != null && game.GameId.Contains(TitleId));
|
||||
if (compatible)
|
||||
{
|
||||
if (game != null)
|
||||
{
|
||||
if (game.GameId.Contains(TitleId))
|
||||
{
|
||||
AmiiboSeries.Add(_amiiboList[i].AmiiboSeries);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
_amiiboSeries.Add(amiibo.AmiiboSeries);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
AmiiboSeries.Add(_amiiboList[i].AmiiboSeries);
|
||||
_amiiboSeries.Add(amiibo.AmiiboSeries);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (LastScannedAmiiboId != string.Empty)
|
||||
{
|
||||
SelectLastScannedAmiibo();
|
||||
}
|
||||
else
|
||||
if (ShowAllAmiibo && _amiiboSeries.Count > 0)
|
||||
{
|
||||
SeriesSelectedIndex = 0;
|
||||
}
|
||||
else if (LastScannedAmiiboId != string.Empty)
|
||||
{
|
||||
SelectLastScannedAmiibo();
|
||||
}
|
||||
else if (_amiiboSeries.Count > 0)
|
||||
{
|
||||
SeriesSelectedIndex = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
SeriesSelectedIndex = -1;
|
||||
}
|
||||
|
||||
FilterAmiibo();
|
||||
}
|
||||
|
||||
private void SelectLastScannedAmiibo()
|
||||
|
|
@ -360,59 +363,60 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||
SeriesSelectedIndex = AmiiboSeries.IndexOf(scanned.AmiiboSeries);
|
||||
AmiiboSelectedIndex = AmiiboList.IndexOf(scanned);
|
||||
}
|
||||
|
||||
|
||||
private void FilterAmiibo()
|
||||
{
|
||||
_amiibos.Clear();
|
||||
|
||||
List<AmiiboApi> amiiboSortedList;
|
||||
|
||||
// If no series selected, just display all available amiibos
|
||||
if (_seriesSelectedIndex < 0)
|
||||
{
|
||||
amiiboSortedList = _amiiboList
|
||||
.OrderBy(amiibo => amiibo.AmiiboSeries)
|
||||
.ThenBy(x => x.Name)
|
||||
.ThenBy(amiibo => amiibo.Name)
|
||||
.ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
string selectedSeries = _amiiboSeries[SeriesSelectedIndex];
|
||||
|
||||
amiiboSortedList = _amiiboList
|
||||
.Where(amiibo => amiibo.AmiiboSeries == _amiiboSeries[SeriesSelectedIndex])
|
||||
.OrderBy(amiibo => amiibo.Name).ToList();
|
||||
.Where(amiibo => amiibo.AmiiboSeries == selectedSeries)
|
||||
.OrderBy(amiibo => amiibo.Name)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
|
||||
|
||||
for (int i = 0; i < amiiboSortedList.Count; i++)
|
||||
foreach (var amiibo in amiiboSortedList)
|
||||
{
|
||||
if (!_amiibos.Contains(amiiboSortedList[i]))
|
||||
if (!_showAllAmiibo)
|
||||
{
|
||||
if (!_showAllAmiibo)
|
||||
{
|
||||
foreach (AmiiboApiGamesSwitch game in amiiboSortedList[i].GamesSwitch)
|
||||
{
|
||||
if (game != null)
|
||||
{
|
||||
if (game.GameId.Contains(TitleId))
|
||||
{
|
||||
_amiibos.Add(amiiboSortedList[i]);
|
||||
bool compatible = amiibo.GamesSwitch.Any(game => game != null && game.GameId.Contains(TitleId));
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
if (compatible)
|
||||
{
|
||||
_amiibos.Add(amiiboSortedList[i]);
|
||||
_amiibos.Add(amiibo);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_amiibos.Add(amiibo);
|
||||
}
|
||||
}
|
||||
|
||||
AmiiboSelectedIndex = 0;
|
||||
}
|
||||
int restoredIndex = -1;
|
||||
for (int i = 0; i < _amiibos.Count; i++)
|
||||
{
|
||||
if (_amiibos[i].GetId() == LastScannedAmiiboId)
|
||||
{
|
||||
restoredIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
AmiiboSelectedIndex = restoredIndex != -1 ? restoredIndex : (_amiibos.Count > 0 ? 0 : -1);
|
||||
}
|
||||
|
||||
private void SetAmiiboDetails()
|
||||
{
|
||||
ResetAmiiboPreview();
|
||||
|
|
@ -420,44 +424,32 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||
Usage = string.Empty;
|
||||
|
||||
if (_amiiboSelectedIndex < 0 || _amiibos.Count < 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
AmiiboApi selected = _amiibos[_amiiboSelectedIndex];
|
||||
|
||||
string imageUrl = _amiiboList.FirstOrDefault(amiibo => amiibo.Equals(selected)).Image;
|
||||
string imageUrl = selected.Image;
|
||||
|
||||
StringBuilder usageStringBuilder = new();
|
||||
|
||||
for (int i = 0; i < _amiiboList.Count; i++)
|
||||
foreach (var game in selected.GamesSwitch)
|
||||
{
|
||||
if (_amiiboList[i].Equals(selected))
|
||||
if (game != null && game.GameId.Contains(TitleId))
|
||||
{
|
||||
bool writable = false;
|
||||
|
||||
foreach (AmiiboApiGamesSwitch item in _amiiboList[i].GamesSwitch)
|
||||
foreach (var usageItem in game.AmiiboUsage)
|
||||
{
|
||||
if (item.GameId.Contains(TitleId))
|
||||
{
|
||||
foreach (AmiiboApiUsage usageItem in item.AmiiboUsage)
|
||||
{
|
||||
usageStringBuilder.Append($"{Environment.NewLine}- {usageItem.Usage.Replace("/", Environment.NewLine + "-")}");
|
||||
|
||||
writable = usageItem.Write;
|
||||
}
|
||||
}
|
||||
usageStringBuilder.Append($"{Environment.NewLine}- {usageItem.Usage.Replace("/", Environment.NewLine + "-")}");
|
||||
}
|
||||
|
||||
if (usageStringBuilder.Length == 0)
|
||||
{
|
||||
usageStringBuilder.Append($"{LocaleManager.Instance[LocaleKeys.Unknown]}.");
|
||||
}
|
||||
|
||||
Usage = $"{LocaleManager.Instance[LocaleKeys.Usage]} {(writable ? $" ({LocaleManager.Instance[LocaleKeys.Writable]})" : string.Empty)} : {usageStringBuilder}";
|
||||
}
|
||||
}
|
||||
|
||||
if (usageStringBuilder.Length == 0)
|
||||
{
|
||||
usageStringBuilder.Append($"{LocaleManager.Instance[LocaleKeys.Unknown]}.");
|
||||
}
|
||||
|
||||
Usage = $"{LocaleManager.Instance[LocaleKeys.AmiiboUsage]}{usageStringBuilder}";
|
||||
|
||||
_ = UpdateAmiiboPreview(imageUrl);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -456,6 +456,8 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||
}
|
||||
|
||||
public bool HasCompatibilityEntry => SelectedApplication.HasPlayabilityInfo;
|
||||
|
||||
public bool IsXCIFile => Path.GetExtension(SelectedApplication.Path)?.ToLower() == ".xci";
|
||||
|
||||
public bool HasDlc => ApplicationLibrary.HasDlcs(SelectedApplication.Id);
|
||||
|
||||
|
|
@ -925,7 +927,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||
}
|
||||
|
||||
dialogMessage +=
|
||||
LocaleManager.Instance[LocaleKeys.DialogFirmwareInstallerFirmwareInstallConfirmMessage];
|
||||
LocaleManager.Instance[LocaleKeys.DialogFirmwareInstallerFirmwareAndKeysInstallConfirmMessage];
|
||||
|
||||
UserResult result = await ContentDialogHelper.CreateConfirmationDialog(
|
||||
dialogTitle,
|
||||
|
|
@ -1025,7 +1027,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||
}
|
||||
|
||||
string dialogTitle =
|
||||
LocaleManager.Instance.UpdateAndGetDynamicValue(LocaleKeys.DialogKeysInstallerKeysInstallTitle);
|
||||
LocaleManager.Instance.UpdateAndGetDynamicValue(LocaleKeys.MenuBarActionsInstallKeys);
|
||||
string dialogMessage =
|
||||
LocaleManager.Instance.UpdateAndGetDynamicValue(LocaleKeys.DialogKeysInstallerKeysInstallMessage);
|
||||
|
||||
|
|
@ -1036,7 +1038,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||
.DialogKeysInstallerKeysInstallSubMessage);
|
||||
}
|
||||
|
||||
dialogMessage += LocaleManager.Instance[LocaleKeys.DialogKeysInstallerKeysInstallConfirmMessage];
|
||||
dialogMessage += LocaleManager.Instance[LocaleKeys.DialogFirmwareInstallerFirmwareAndKeysInstallConfirmMessage];
|
||||
|
||||
UserResult result = await ContentDialogHelper.CreateConfirmationDialog(
|
||||
dialogTitle,
|
||||
|
|
@ -1357,9 +1359,10 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||
{
|
||||
Optional<IStorageFile> result = await StorageProvider.OpenSingleFilePickerAsync(new FilePickerOpenOptions
|
||||
{
|
||||
Title = LocaleManager.Instance[LocaleKeys.InstallFirmwareFromFileDialogTitle],
|
||||
FileTypeFilter = new List<FilePickerFileType>
|
||||
{
|
||||
new(LocaleManager.Instance[LocaleKeys.FileDialogAllTypes])
|
||||
new(LocaleManager.Instance[LocaleKeys.AllSupportedFormats])
|
||||
{
|
||||
Patterns = ["*.xci", "*.zip"],
|
||||
AppleUniformTypeIdentifiers = ["com.ryujinx.xci", "public.zip-archive"],
|
||||
|
|
@ -1388,7 +1391,10 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||
|
||||
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)
|
||||
{
|
||||
|
|
@ -1400,6 +1406,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||
{
|
||||
Optional<IStorageFile> result = await StorageProvider.OpenSingleFilePickerAsync(new FilePickerOpenOptions
|
||||
{
|
||||
Title = LocaleManager.Instance[LocaleKeys.InstallKeysFromFileDialogTitle],
|
||||
FileTypeFilter = new List<FilePickerFileType>
|
||||
{
|
||||
new("KEYS")
|
||||
|
|
@ -1419,7 +1426,10 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||
|
||||
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)
|
||||
{
|
||||
|
|
@ -1841,17 +1851,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)
|
||||
{
|
||||
Optional<IStorageFile> result = await StorageProvider.OpenSingleFilePickerAsync(
|
||||
new FilePickerOpenOptions
|
||||
{
|
||||
Title = LocaleManager.Instance[LocaleKeys.OpenFileDialogTitle],
|
||||
Title = LocaleManager.Instance[LocaleKeys.OpenAmiiboBinFileDialogTitle],
|
||||
FileTypeFilter = new List<FilePickerFileType>
|
||||
{
|
||||
new(LocaleManager.Instance[LocaleKeys.AllSupportedFormats])
|
||||
new("BIN")
|
||||
{
|
||||
Patterns = ["*.bin"],
|
||||
}
|
||||
|
|
@ -2015,11 +2043,10 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||
|
||||
if (trimmer.CanBeTrimmed)
|
||||
{
|
||||
double savings = (double)trimmer.DiskSpaceSavingsB / 1024.0 / 1024.0;
|
||||
double currentFileSize = (double)trimmer.FileSizeB / 1024.0 / 1024.0;
|
||||
double cartDataSize = (double)trimmer.DataSizeB / 1024.0 / 1024.0;
|
||||
string secondaryText = LocaleManager.Instance.UpdateAndGetDynamicValue(
|
||||
LocaleKeys.TrimXCIFileDialogSecondaryText, currentFileSize, cartDataSize, savings);
|
||||
int savings = (int)Math.Round((double)trimmer.DiskSpaceSavingsB / 1024.0 / 1024.0);
|
||||
int currentFileSize = (int)Math.Round((double)trimmer.FileSizeB / 1024.0 / 1024.0);
|
||||
int cartDataSize = (int)Math.Round((double)trimmer.DataSizeB / 1024.0 / 1024.0);
|
||||
string secondaryText = LocaleManager.Instance.UpdateAndGetDynamicValue(LocaleKeys.TrimXCIFileDialogSecondaryText, currentFileSize.ToString("0"), cartDataSize.ToString("0"), savings.ToString("0"));
|
||||
|
||||
UserResult result = await ContentDialogHelper.CreateConfirmationDialog(
|
||||
LocaleManager.Instance[LocaleKeys.TrimXCIFileDialogPrimaryText],
|
||||
|
|
@ -2037,7 +2064,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||
{
|
||||
StatusBarProgressStatusText =
|
||||
LocaleManager.Instance.UpdateAndGetDynamicValue(LocaleKeys.StatusBarXCIFileTrimming,
|
||||
Path.GetFileName(filename));
|
||||
Path.GetFileNameWithoutExtension(filename));
|
||||
StatusBarProgressStatusVisible = true;
|
||||
StatusBarProgressMaximum = 1;
|
||||
StatusBarProgressValue = 0;
|
||||
|
|
|
|||
|
|
@ -115,6 +115,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||
nameof(PotentialSavings),
|
||||
nameof(ActualSavings),
|
||||
nameof(CanTrim),
|
||||
nameof(SavingsDifference),
|
||||
nameof(CanUntrim));
|
||||
|
||||
DisplayedChanged();
|
||||
|
|
@ -312,13 +313,14 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||
}
|
||||
}
|
||||
|
||||
public void SelectDisplayed()
|
||||
public void SelectAll()
|
||||
{
|
||||
SelectedXCIFiles.Clear();
|
||||
SelectedXCIFiles.AddRange(DisplayedXCIFiles);
|
||||
SelectionChanged();
|
||||
}
|
||||
|
||||
public void DeselectDisplayed()
|
||||
public void DeselectAll()
|
||||
{
|
||||
SelectedXCIFiles.RemoveMany(DisplayedXCIFiles);
|
||||
SelectionChanged();
|
||||
|
|
@ -426,8 +428,8 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||
{
|
||||
return _processingMode switch
|
||||
{
|
||||
ProcessingMode.Trimming => string.Format(LocaleManager.Instance[LocaleKeys.XCITrimmerTitleStatusTrimming], DisplayedXCIFiles.Count),
|
||||
ProcessingMode.Untrimming => string.Format(LocaleManager.Instance[LocaleKeys.XCITrimmerTitleStatusUntrimming], DisplayedXCIFiles.Count),
|
||||
ProcessingMode.Trimming => string.Format(LocaleManager.Instance[LocaleKeys.XCITrimmerTitleStatusTrimming], SelectedXCIFiles.Count),
|
||||
ProcessingMode.Untrimming => string.Format(LocaleManager.Instance[LocaleKeys.XCITrimmerTitleStatusUntrimming], SelectedXCIFiles.Count),
|
||||
_ => 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
|
||||
{
|
||||
get
|
||||
|
|
|
|||
|
|
@ -13,102 +13,101 @@
|
|||
x:DataType="viewModels:XciTrimmerViewModel"
|
||||
Focusable="True"
|
||||
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
|
||||
Margin="10 10 10 10"
|
||||
Margin="0,0,0,10"
|
||||
Grid.Row="0">
|
||||
<TextBlock Text="{Binding Status}" />
|
||||
</Panel>
|
||||
<Panel
|
||||
Margin="0 0 10 10"
|
||||
IsVisible="{Binding !Processing}"
|
||||
Grid.Row="1">
|
||||
<Grid ColumnDefinitions="Auto,*,Auto">
|
||||
<StackPanel
|
||||
Grid.Column="0"
|
||||
Orientation="Horizontal">
|
||||
<DropDownButton
|
||||
Width="150"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Content="{Binding SortingFieldName}">
|
||||
<DropDownButton.Flyout>
|
||||
<Flyout Placement="Bottom">
|
||||
<StackPanel
|
||||
Margin="0"
|
||||
HorizontalAlignment="Stretch"
|
||||
Orientation="Vertical">
|
||||
<StackPanel>
|
||||
<RadioButton
|
||||
Checked="Sort_Checked"
|
||||
Content="{ext:Locale XCITrimmerSortName}"
|
||||
GroupName="Sort"
|
||||
IsChecked="{Binding IsSortedByName, Mode=OneTime}"
|
||||
Tag="Name" />
|
||||
<RadioButton
|
||||
Checked="Sort_Checked"
|
||||
Content="{ext:Locale XCITrimmerSortSaved}"
|
||||
GroupName="Sort"
|
||||
IsChecked="{Binding IsSortedBySaved, Mode=OneTime}"
|
||||
Tag="Saved" />
|
||||
</StackPanel>
|
||||
<Border
|
||||
Width="60"
|
||||
Height="2"
|
||||
Margin="5"
|
||||
HorizontalAlignment="Stretch"
|
||||
BorderBrush="White"
|
||||
BorderThickness="0,1,0,0">
|
||||
<Separator Height="0" HorizontalAlignment="Stretch" />
|
||||
</Border>
|
||||
<Grid Margin="0,0,0,10" Grid.Row="1" IsVisible="{Binding !Processing}" ColumnDefinitions="Auto,*">
|
||||
<StackPanel
|
||||
Grid.Column="0"
|
||||
Orientation="Horizontal"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center">
|
||||
<Button
|
||||
Name="SelectAllButton"
|
||||
MinWidth="90"
|
||||
Margin="0,0,10,0"
|
||||
Command="{Binding SelectAll}">
|
||||
<TextBlock Text="{ext:Locale XCITrimmerSelectAll}" />
|
||||
</Button>
|
||||
<Button
|
||||
Name="DeselectAllButton"
|
||||
MinWidth="90"
|
||||
Margin="0,0,0,0"
|
||||
Command="{Binding DeselectAll}">
|
||||
<TextBlock Text="{ext:Locale XCITrimmerDeselectAll}" />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
<StackPanel
|
||||
Orientation="Horizontal"
|
||||
Grid.Column="1"
|
||||
HorizontalAlignment="Right">
|
||||
<DropDownButton
|
||||
Width="150"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Content="{Binding SortingFieldName}">
|
||||
<DropDownButton.Flyout>
|
||||
<Flyout Placement="Bottom">
|
||||
<StackPanel
|
||||
Margin="0"
|
||||
HorizontalAlignment="Stretch"
|
||||
Orientation="Vertical">
|
||||
<StackPanel>
|
||||
<RadioButton
|
||||
Checked="Order_Checked"
|
||||
Content="{ext:Locale OrderAscending}"
|
||||
GroupName="Order"
|
||||
IsChecked="{Binding SortingAscending, Mode=OneTime}"
|
||||
Tag="Ascending" />
|
||||
Checked="Sort_Checked"
|
||||
Content="{ext:Locale XCITrimmerSortName}"
|
||||
GroupName="Sort"
|
||||
IsChecked="{Binding IsSortedByName, Mode=OneTime}"
|
||||
Tag="Name" />
|
||||
<RadioButton
|
||||
Checked="Order_Checked"
|
||||
Content="{ext:Locale OrderDescending}"
|
||||
GroupName="Order"
|
||||
IsChecked="{Binding !SortingAscending, Mode=OneTime}"
|
||||
Tag="Descending" />
|
||||
Checked="Sort_Checked"
|
||||
Content="{ext:Locale XCITrimmerSortSaved}"
|
||||
GroupName="Sort"
|
||||
IsChecked="{Binding IsSortedBySaved, Mode=OneTime}"
|
||||
Tag="Saved" />
|
||||
</StackPanel>
|
||||
</Flyout>
|
||||
</DropDownButton.Flyout>
|
||||
</DropDownButton>
|
||||
</StackPanel>
|
||||
<Border
|
||||
Width="60"
|
||||
Height="2"
|
||||
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
|
||||
Grid.Column="1"
|
||||
MinHeight="29"
|
||||
MaxHeight="29"
|
||||
Margin="5 0 5 0"
|
||||
HorizontalAlignment="Stretch"
|
||||
Width="200"
|
||||
MaxWidth="200"
|
||||
Margin="5,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Right"
|
||||
Watermark="{ext:Locale Search}"
|
||||
Text="{Binding Search}" />
|
||||
<StackPanel
|
||||
Grid.Column="2"
|
||||
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>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
<Border
|
||||
Grid.Row="2"
|
||||
Margin="0 0 0 10"
|
||||
Margin="0,0,0,20"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
BorderBrush="{DynamicResource AppListHoverBackgroundColor}"
|
||||
|
|
@ -124,122 +123,99 @@
|
|||
SelectedItems="{Binding SelectedDisplayedXCIFiles, Mode=OneWay}"
|
||||
ItemsSource="{Binding DisplayedXCIFiles}"
|
||||
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>
|
||||
<Style Selector="ListBoxItem">
|
||||
<Setter Property="Margin" Value="0" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
</Style>
|
||||
</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="Center"
|
||||
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="Center"
|
||||
VerticalAlignment="Center"
|
||||
MaxLines="1"
|
||||
Text="{Binding ., Converter={x:Static helpers:XCITrimmerFileSpaceSavingsConverter.Instance}}">
|
||||
</TextBlock>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListBox.DataTemplates>
|
||||
</ListBox>
|
||||
</Border>
|
||||
<Border
|
||||
Grid.Row="3"
|
||||
Margin="0 0 0 10"
|
||||
HorizontalAlignment="Stretch"
|
||||
BorderBrush="{DynamicResource AppListHoverBackgroundColor}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="5"
|
||||
Padding="2.5">
|
||||
<Grid ColumnDefinitions="Auto,*" RowDefinitions="Auto,Auto">
|
||||
<TextBlock
|
||||
Grid.Column="0"
|
||||
Grid.Row="0"
|
||||
Classes="h1"
|
||||
Margin="5"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
MaxLines="1"
|
||||
Text="{ext:Locale XCITrimmerPotentialSavings}" />
|
||||
<TextBlock
|
||||
Grid.Column="0"
|
||||
Grid.Row="1"
|
||||
Classes="h1"
|
||||
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>
|
||||
<StackPanel Grid.Row="3" Margin="0,0,0,20" Spacing="5" HorizontalAlignment="Center" VerticalAlignment="Center" Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Classes="h1"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
MaxLines="1"
|
||||
Text="{ext:Locale XCITrimmerTotalSavings}" />
|
||||
<TextBlock
|
||||
Classes="h1"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
FontWeight="Regular"
|
||||
MaxLines="1"
|
||||
Text="{Binding ActualSavings}" />
|
||||
<TextBlock
|
||||
Classes="h1"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
FontWeight="Regular"
|
||||
MaxLines="1"
|
||||
Text="{Binding SavingsDifference}" />
|
||||
</StackPanel>
|
||||
<Panel
|
||||
Grid.Row="4"
|
||||
Margin="0,10,0,0"
|
||||
HorizontalAlignment="Stretch">
|
||||
<Grid ColumnDefinitions="*,Auto">
|
||||
<StackPanel
|
||||
|
|
@ -250,7 +226,6 @@
|
|||
<Button
|
||||
Name="TrimButton"
|
||||
MinWidth="90"
|
||||
Margin="5"
|
||||
Click="Trim"
|
||||
IsEnabled="{Binding CanTrim}">
|
||||
<TextBlock Text="{ext:Locale XCITrimmerTrim}" />
|
||||
|
|
@ -258,7 +233,6 @@
|
|||
<Button
|
||||
Name="UntrimButton"
|
||||
MinWidth="90"
|
||||
Margin="5"
|
||||
Click="Untrim"
|
||||
IsEnabled="{Binding CanUntrim}">
|
||||
<TextBlock Text="{ext:Locale XCITrimmerUntrim}" />
|
||||
|
|
@ -272,7 +246,6 @@
|
|||
<Button
|
||||
Name="CancellingButton"
|
||||
MinWidth="90"
|
||||
Margin="5"
|
||||
Click="Cancel"
|
||||
IsEnabled="False">
|
||||
<Button.IsVisible>
|
||||
|
|
@ -286,7 +259,6 @@
|
|||
<Button
|
||||
Name="CancelButton"
|
||||
MinWidth="90"
|
||||
Margin="5"
|
||||
Click="Cancel">
|
||||
<Button.IsVisible>
|
||||
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||
|
|
@ -299,10 +271,9 @@
|
|||
<Button
|
||||
Name="CloseButton"
|
||||
MinWidth="90"
|
||||
Margin="5"
|
||||
Click="Close"
|
||||
IsVisible="{Binding !Processing}">
|
||||
<TextBlock Text="{ext:Locale InputDialogClose}" />
|
||||
<TextBlock Text="{ext:Locale SettingsButtonClose}" />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ namespace Ryujinx.Ava.UI.Views.Dialog
|
|||
{
|
||||
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>());
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@
|
|||
Icon="{ext:Icon fa-solid fa-stop}"
|
||||
InputGesture="Escape"
|
||||
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 />
|
||||
<MenuItem
|
||||
Command="{Binding OpenAmiiboWindow}"
|
||||
|
|
@ -176,7 +176,7 @@
|
|||
InputGesture="Ctrl + A"
|
||||
IsEnabled="{Binding IsAmiiboRequested}" />
|
||||
<MenuItem
|
||||
Command="{Binding OpenBinFile}"
|
||||
Command="{Binding OpenAmiiboBinFile}"
|
||||
AttachedToVisualTree="ScanBinAmiiboMenuItem_AttachedToVisualTree"
|
||||
Header="{ext:Locale MenuBarActionsScanAmiiboBin}"
|
||||
Icon="{ext:Icon fa-solid fa-cube}"
|
||||
|
|
@ -196,9 +196,10 @@
|
|||
InputGesture="{Binding ShowUiKey}"
|
||||
IsEnabled="{Binding IsGameRunning}" />
|
||||
<MenuItem
|
||||
Name="CheatManagerMenuItem"
|
||||
Command="{Binding OpenCheatManagerForCurrentApp}"
|
||||
Header="{ext:Locale GameListContextMenuManageCheat}"
|
||||
Icon="{ext:Icon fa-solid fa-code}"
|
||||
InputGesture="Ctrl + C"
|
||||
IsEnabled="{Binding IsGameRunning}" />
|
||||
</MenuItem>
|
||||
<MenuItem VerticalAlignment="Center" Header="{ext:Locale MenuBarActions}" IsVisible="{Binding EnableNonGameRunningControls}">
|
||||
|
|
@ -217,8 +218,8 @@
|
|||
<Separator />
|
||||
<MenuItem Header="{ext:Locale MenuBarActionsTools}" Icon="{ext:Icon fa-solid fa-toolbox}">
|
||||
<MenuItem
|
||||
Name="MiiAppletMenuItem" Header="{ext:Locale MenuBarActionsOpenMiiEditor}" Icon="{ext:Icon fa-solid fa-face-grin-wide}" ToolTip.Tip="{ext:Locale MenuBarActionsOpenMiiEditorToolTip}" />
|
||||
<MenuItem Name="XciTrimmerMenuItem" Header="{ext:Locale MenuBarActionsXCITrimmer}" Icon="{ext:Icon fa-solid fa-scissors}" />
|
||||
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}" ToolTip.Tip="{ext:Locale MenuBarActionsXCITrimmerTooltip}" />
|
||||
</MenuItem>
|
||||
</MenuItem>
|
||||
<MenuItem VerticalAlignment="Center" Header="{ext:Locale MenuBarView}">
|
||||
|
|
|
|||
|
|
@ -43,7 +43,6 @@ namespace Ryujinx.Ava.UI.Views.Main
|
|||
PauseEmulationMenuItem.Command = Commands.Create(() => ViewModel.AppHost?.Pause());
|
||||
ResumeEmulationMenuItem.Command = Commands.Create(() => ViewModel.AppHost?.Resume());
|
||||
StopEmulationMenuItem.Command = Commands.Create(() => ViewModel.AppHost?.ShowExitPrompt().OrCompleted());
|
||||
CheatManagerMenuItem.Command = Commands.CreateSilentFail(OpenCheatManagerForCurrentApp);
|
||||
InstallFileTypesMenuItem.Command = Commands.Create(InstallFileTypes);
|
||||
UninstallFileTypesMenuItem.Command = Commands.Create(UninstallFileTypes);
|
||||
XciTrimmerMenuItem.Command = Commands.Create(XciTrimmerView.Show);
|
||||
|
|
@ -166,7 +165,7 @@ namespace Ryujinx.Ava.UI.Views.Main
|
|||
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()
|
||||
{
|
||||
|
|
@ -176,24 +175,6 @@ namespace Ryujinx.Ava.UI.Views.Main
|
|||
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)
|
||||
{
|
||||
if (sender is MenuItem)
|
||||
|
|
|
|||
|
|
@ -16,75 +16,77 @@
|
|||
WindowStartupLocation="CenterOwner"
|
||||
Width="800"
|
||||
MinHeight="650"
|
||||
Height="650"
|
||||
Height="700"
|
||||
SizeToContent="Manual"
|
||||
MinWidth="600"
|
||||
Focusable="True">
|
||||
<Design.DataContext>
|
||||
<viewModels:AmiiboWindowViewModel />
|
||||
</Design.DataContext>
|
||||
<Grid RowDefinitions="Auto,Auto,*,Auto" Margin="15" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" >
|
||||
<Grid Name="FlushControls" ColumnDefinitions="Auto,Auto" Grid.Row="1" Margin="-15">
|
||||
<controls:RyujinxLogo
|
||||
<Grid Grid.Row="0" RowDefinitions="Auto,Auto,*,Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||
|
||||
<!-- UI FlushControls -->
|
||||
<Grid Grid.Row="0" ColumnDefinitions="Auto,Auto,Auto,Auto" Name="FlushControls">
|
||||
<controls:RyujinxLogo
|
||||
Grid.Column="0"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Top"
|
||||
Margin="8, 8, 7, 0"
|
||||
Margin="7,0,7,0"
|
||||
ToolTip.Tip="{ext:WindowTitle Amiibo}" />
|
||||
<StackPanel Grid.Column="1" Orientation="Horizontal" Margin="0, 0, 0, 20">
|
||||
<StackPanel Spacing="10" Orientation="Horizontal" HorizontalAlignment="Left">
|
||||
<TextBlock VerticalAlignment="Center" Text="{ext:Locale AmiiboSeriesLabel}" />
|
||||
<ComboBox Margin="0, 8, 0, 0" SelectedIndex="{Binding SeriesSelectedIndex}" ItemsSource="{Binding AmiiboSeries}" MinWidth="100" />
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="1" Orientation="Horizontal">
|
||||
<TextBlock Margin="8,0,0,0" VerticalAlignment="Center" Text="{ext:Locale AmiiboSeriesLabel}" />
|
||||
<ComboBox Margin="5,5,0,5" SelectedIndex="{Binding SeriesSelectedIndex}" ItemsSource="{Binding AmiiboSeries}" MinWidth="100" />
|
||||
</StackPanel>
|
||||
<CheckBox Grid.Column="2" Margin="15,0,0,0" IsChecked="{Binding ShowAllAmiibo}">
|
||||
<TextBlock Text="{ext:Locale AmiiboOptionsShowAllLabel}" />
|
||||
</CheckBox>
|
||||
<CheckBox Grid.Column="3" Margin="15,0,0,0" HotKey="H" IsChecked="{Binding UseRandomUuid}" >
|
||||
<TextBlock Text="{ext:Locale AmiiboOptionsUsRandomTagLabel}" />
|
||||
</CheckBox>
|
||||
</Grid>
|
||||
<Grid Name="NormalControls" ColumnDefinitions="*,*" Grid.Row="1" HorizontalAlignment="Stretch" >
|
||||
<StackPanel Spacing="10" Orientation="Horizontal" HorizontalAlignment="Left">
|
||||
<TextBlock VerticalAlignment="Center" Text="{ext:Locale AmiiboSeriesLabel}" />
|
||||
<ComboBox SelectedIndex="{Binding SeriesSelectedIndex}" ItemsSource="{Binding AmiiboSeries}" MinWidth="100" />
|
||||
|
||||
<!-- UI NormalControls -->
|
||||
<Grid Grid.Row="0" ColumnDefinitions="Auto,Auto,Auto" Name="NormalControls">
|
||||
<StackPanel Grid.Column="0" Orientation="Horizontal">
|
||||
<TextBlock Margin="15,0,0,0" VerticalAlignment="Center" Text="{ext:Locale AmiiboSeriesLabel}" />
|
||||
<ComboBox Margin="5,5,0,5" SelectedIndex="{Binding SeriesSelectedIndex}" ItemsSource="{Binding AmiiboSeries}" MinWidth="100" />
|
||||
</StackPanel>
|
||||
<CheckBox Grid.Column="1" Margin="15,0,0,0" IsChecked="{Binding ShowAllAmiibo}">
|
||||
<TextBlock Text="{ext:Locale AmiiboOptionsShowAllLabel}" />
|
||||
</CheckBox>
|
||||
<CheckBox Grid.Column="2" Margin="15,0,0,0" IsChecked="{Binding UseRandomUuid}" HotKey="H">
|
||||
<TextBlock Text="{ext:Locale AmiiboOptionsUsRandomTagLabel}" />
|
||||
</CheckBox>
|
||||
</Grid>
|
||||
<DockPanel Grid.Row="2">
|
||||
|
||||
<!-- Amiibo ListBox, Images, Buttons -->
|
||||
<StackPanel Grid.Row="2" Margin="0,20,0,20" Orientation="Horizontal" HorizontalAlignment="Center" Spacing="50">
|
||||
<ListBox
|
||||
DockPanel.Dock="Left"
|
||||
Width="300"
|
||||
Margin="20"
|
||||
Width="250"
|
||||
Padding="5"
|
||||
SelectionMode="Single"
|
||||
ItemsSource="{Binding AmiiboList}"
|
||||
SelectedIndex="{Binding AmiiboSelectedIndex}">
|
||||
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Margin="10, 0, 0 ,0" Text="{Binding Name}" />
|
||||
<TextBlock Margin="10,0,0,0" Text="{Binding Name}" />
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
<StackPanel Margin="20">
|
||||
<Image Source="{Binding AmiiboImage}" Height="350" Width="150" HorizontalAlignment="Center" />
|
||||
<ScrollViewer MaxHeight="120" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto"
|
||||
Margin="20" VerticalAlignment="Top" HorizontalAlignment="Stretch">
|
||||
<TextBlock TextWrapping="Wrap" Text="{Binding Usage}" HorizontalAlignment="Center"
|
||||
TextAlignment="Center" />
|
||||
<StackPanel Width="250">
|
||||
<Image Source="{Binding AmiiboImage}" Height="400" Width="200" />
|
||||
<ScrollViewer MaxHeight="120" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto" Margin="20" VerticalAlignment="Top" HorizontalAlignment="Stretch">
|
||||
<TextBlock TextWrapping="Wrap" Text="{Binding Usage}" HorizontalAlignment="Center" TextAlignment="Center" />
|
||||
</ScrollViewer>
|
||||
</StackPanel>
|
||||
</DockPanel>
|
||||
<Grid Grid.Row="3" ColumnDefinitions="Auto,Auto,*,Auto,Auto">
|
||||
<CheckBox Margin="10" Grid.Column="0" VerticalContentAlignment="Center"
|
||||
IsChecked="{Binding ShowAllAmiibo}"
|
||||
Content="{ext:Locale AmiiboOptionsShowAllLabel}" />
|
||||
<CheckBox HotKey="H"
|
||||
Margin="10" VerticalContentAlignment="Center" Grid.Column="1"
|
||||
IsChecked="{Binding UseRandomUuid}"
|
||||
Content="{ext:Locale AmiiboOptionsUsRandomTagLabel}" />
|
||||
</StackPanel>
|
||||
<Grid Grid.Row="3" Margin="0,0,10,10" ColumnDefinitions="Auto,Auto,*,Auto,Auto">
|
||||
<Button Grid.Column="3"
|
||||
IsEnabled="{Binding EnableScanning}"
|
||||
Width="80"
|
||||
Name="ScanButton"
|
||||
HotKey="Return"
|
||||
Content="{ext:Locale AmiiboScanButtonLabel}"
|
||||
Click="ScanButton_Click" />
|
||||
<Button Grid.Column="4"
|
||||
Margin="10,0"
|
||||
Margin="10,0,0,0"
|
||||
Width="80"
|
||||
Name="CancelButton"
|
||||
HotKey="Escape"
|
||||
|
|
|
|||
|
|
@ -40,7 +40,9 @@
|
|||
<KeyBinding Gesture="F9" Command="{Binding ToggleDockMode}" />
|
||||
<KeyBinding Gesture="Escape" Command="{Binding ExitCurrentState}" />
|
||||
<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>
|
||||
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" RowDefinitions="*">
|
||||
<helpers:OffscreenTextBox IsEnabled="False" Opacity="0" Name="HiddenTextBox" IsHitTestVisible="False" IsTabStop="False" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue