mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-06-27 22:06:24 +02:00
feat(ui): show all available Amiibo if no series selected
This commit is contained in:
parent
c2a9e806e8
commit
7375a00f01
3 changed files with 41 additions and 25 deletions
|
@ -15675,26 +15675,26 @@
|
||||||
{
|
{
|
||||||
"ID": "AmiiboOptionsShowAllLabel",
|
"ID": "AmiiboOptionsShowAllLabel",
|
||||||
"Translations": {
|
"Translations": {
|
||||||
"ar_SA": "إظهار كل أميبو",
|
"ar_SA": "",
|
||||||
"de_DE": "Zeige alle Amiibos",
|
"de_DE": "",
|
||||||
"el_GR": "Εμφάνιση όλων των Amiibo",
|
"el_GR": "",
|
||||||
"en_US": "Show All Amiibo",
|
"en_US": "Show incompatible Amiibo for this game",
|
||||||
"es_ES": "Mostrar todos los Amiibo",
|
"es_ES": "Mostrar Amiibo incompatibles con este juego",
|
||||||
"fr_FR": "Afficher tous les Amiibo",
|
"fr_FR": "",
|
||||||
"he_IL": "הצג את כל האמיבואים",
|
"he_IL": "",
|
||||||
"it_IT": "Mostra tutti gli amiibo",
|
"it_IT": "",
|
||||||
"ja_JP": "すべての Amiibo を表示",
|
"ja_JP": "",
|
||||||
"ko_KR": "모든 Amiibo 표시",
|
"ko_KR": "",
|
||||||
"no_NO": "Vis alle Amiibo",
|
"no_NO": "",
|
||||||
"pl_PL": "Pokaż Wszystkie Amiibo",
|
"pl_PL": "",
|
||||||
"pt_BR": "Exibir Todos os Amiibos",
|
"pt_BR": "",
|
||||||
"ru_RU": "Показать все Amiibo",
|
"ru_RU": "",
|
||||||
"sv_SE": "Visa alla Amiibo",
|
"sv_SE": "",
|
||||||
"th_TH": "แสดง Amiibo ทั้งหมด",
|
"th_TH": "",
|
||||||
"tr_TR": "Tüm Amiibo'ları Göster",
|
"tr_TR": "",
|
||||||
"uk_UA": "Показати всі Amiibo",
|
"uk_UA": "",
|
||||||
"zh_CN": "显示所有 Amiibo",
|
"zh_CN": "",
|
||||||
"zh_TW": "顯示所有 Amiibo"
|
"zh_TW": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -342,14 +342,24 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||||
{
|
{
|
||||||
_amiibos.Clear();
|
_amiibos.Clear();
|
||||||
|
|
||||||
|
List<AmiiboApi> amiiboSortedList;
|
||||||
|
|
||||||
|
// If no series selected, just display all available amiibos
|
||||||
if (_seriesSelectedIndex < 0)
|
if (_seriesSelectedIndex < 0)
|
||||||
{
|
{
|
||||||
return;
|
amiiboSortedList = _amiiboList
|
||||||
|
.OrderBy(amiibo => amiibo.AmiiboSeries)
|
||||||
|
.ThenBy(x => x.Name)
|
||||||
|
.ToList();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
amiiboSortedList = _amiiboList
|
||||||
|
.Where(amiibo => amiibo.AmiiboSeries == _amiiboSeries[SeriesSelectedIndex])
|
||||||
|
.OrderBy(amiibo => amiibo.Name).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
List<AmiiboApi> amiiboSortedList = _amiiboList
|
|
||||||
.Where(amiibo => amiibo.AmiiboSeries == _amiiboSeries[SeriesSelectedIndex])
|
|
||||||
.OrderBy(amiibo => amiibo.Name).ToList();
|
|
||||||
|
|
||||||
for (int i = 0; i < amiiboSortedList.Count; i++)
|
for (int i = 0; i < amiiboSortedList.Count; i++)
|
||||||
{
|
{
|
||||||
|
@ -386,7 +396,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||||
|
|
||||||
Usage = string.Empty;
|
Usage = string.Empty;
|
||||||
|
|
||||||
if (_amiiboSelectedIndex < 0)
|
if (_amiiboSelectedIndex < 0 || _amiibos.Count < 1)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,6 +56,12 @@
|
||||||
SelectionMode="Single"
|
SelectionMode="Single"
|
||||||
ItemsSource="{Binding AmiiboList}"
|
ItemsSource="{Binding AmiiboList}"
|
||||||
SelectedIndex="{Binding AmiiboSelectedIndex}">
|
SelectedIndex="{Binding AmiiboSelectedIndex}">
|
||||||
|
|
||||||
|
<ListBox.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock Margin="10, 0, 0 ,0" Text="{Binding Name}" />
|
||||||
|
</DataTemplate>
|
||||||
|
</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="350" Width="150" HorizontalAlignment="Center" />
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue