mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-06-27 19:56:23 +02:00
Merge branch 'master' into 'master'
feat(ui): improve Amiibo selection UX See merge request [ryubing/ryujinx!73](https://git.ryujinx.app/ryubing/ryujinx/-/merge_requests/73)
This commit is contained in:
commit
4aad34d2e8
3 changed files with 59 additions and 37 deletions
|
@ -15825,26 +15825,26 @@
|
|||
{
|
||||
"ID": "AmiiboOptionsShowAllLabel",
|
||||
"Translations": {
|
||||
"ar_SA": "إظهار كل أميبو",
|
||||
"de_DE": "Zeige alle Amiibos",
|
||||
"el_GR": "Εμφάνιση όλων των Amiibo",
|
||||
"en_US": "Show All Amiibo",
|
||||
"es_ES": "Mostrar todos los Amiibo",
|
||||
"fr_FR": "Afficher tous les Amiibo",
|
||||
"he_IL": "הצג את כל האמיבואים",
|
||||
"it_IT": "Mostra tutti gli amiibo",
|
||||
"ja_JP": "すべての Amiibo を表示",
|
||||
"ko_KR": "모든 Amiibo 표시",
|
||||
"no_NO": "Vis alle Amiibo",
|
||||
"pl_PL": "Pokaż Wszystkie Amiibo",
|
||||
"pt_BR": "Exibir Todos os Amiibos",
|
||||
"ru_RU": "Показать все Amiibo",
|
||||
"sv_SE": "Visa alla Amiibo",
|
||||
"th_TH": "แสดง Amiibo ทั้งหมด",
|
||||
"tr_TR": "Tüm Amiibo'ları Göster",
|
||||
"uk_UA": "Показати всі Amiibo",
|
||||
"zh_CN": "显示所有 Amiibo",
|
||||
"zh_TW": "顯示所有 Amiibo"
|
||||
"ar_SA": "",
|
||||
"de_DE": "",
|
||||
"el_GR": "",
|
||||
"en_US": "Show incompatible Amiibo for this game",
|
||||
"es_ES": "Mostrar Amiibo incompatibles con este juego",
|
||||
"fr_FR": "",
|
||||
"he_IL": "",
|
||||
"it_IT": "",
|
||||
"ja_JP": "",
|
||||
"ko_KR": "",
|
||||
"no_NO": "",
|
||||
"pl_PL": "",
|
||||
"pt_BR": "",
|
||||
"ru_RU": "",
|
||||
"sv_SE": "",
|
||||
"th_TH": "",
|
||||
"tr_TR": "",
|
||||
"uk_UA": "",
|
||||
"zh_CN": "",
|
||||
"zh_TW": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
@ -342,14 +342,24 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||
{
|
||||
_amiibos.Clear();
|
||||
|
||||
List<AmiiboApi> amiiboSortedList;
|
||||
|
||||
// If no series selected, just display all available amiibos
|
||||
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++)
|
||||
{
|
||||
|
@ -386,7 +396,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||
|
||||
Usage = string.Empty;
|
||||
|
||||
if (_amiiboSelectedIndex < 0)
|
||||
if (_amiiboSelectedIndex < 0 || _amiibos.Count < 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -47,19 +47,31 @@
|
|||
<TextBlock VerticalAlignment="Center" Text="{ext:Locale AmiiboSeriesLabel}" />
|
||||
<ComboBox SelectedIndex="{Binding SeriesSelectedIndex}" ItemsSource="{Binding AmiiboSeries}" MinWidth="100" />
|
||||
</StackPanel>
|
||||
<StackPanel Spacing="10" Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<TextBlock VerticalAlignment="Center" Text="{ext:Locale AmiiboCharacterLabel}" />
|
||||
<ComboBox SelectedIndex="{Binding AmiiboSelectedIndex}" MinWidth="100" ItemsSource="{Binding AmiiboList}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
<StackPanel Margin="20" Grid.Row="2">
|
||||
<Image Source="{Binding AmiiboImage}" Height="350" Width="350" 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" />
|
||||
</ScrollViewer>
|
||||
</StackPanel>
|
||||
<DockPanel Grid.Row="2">
|
||||
<ListBox
|
||||
DockPanel.Dock="Left"
|
||||
Width="300"
|
||||
Margin="20"
|
||||
SelectionMode="Single"
|
||||
ItemsSource="{Binding AmiiboList}"
|
||||
SelectedIndex="{Binding AmiiboSelectedIndex}">
|
||||
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<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" />
|
||||
</ScrollViewer>
|
||||
</StackPanel>
|
||||
</DockPanel>
|
||||
<Grid Grid.Row="3" ColumnDefinitions="Auto,Auto,*,Auto,Auto">
|
||||
<CheckBox Margin="10" Grid.Column="0" VerticalContentAlignment="Center"
|
||||
IsChecked="{Binding ShowAllAmiibo}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue