按好感度排序

This commit is contained in:
ZouJin 2023-09-14 20:02:07 +08:00
parent 0580368cf8
commit 2d5439fbf6
2 changed files with 7 additions and 0 deletions

View File

@ -286,6 +286,7 @@
<ListBoxItem Content="{ll:Str 按心情}" /> <ListBoxItem Content="{ll:Str 按心情}" />
<ListBoxItem Content="{ll:Str 按健康}" /> <ListBoxItem Content="{ll:Str 按健康}" />
<ListBoxItem Content="{ll:Str 按经验值}" /> <ListBoxItem Content="{ll:Str 按经验值}" />
<ListBoxItem Content="{ll:Str 按好感度}" />
</ListBox> </ListBox>
<Rectangle Grid.Column="1" Margin="10,0,10,0" Width="1" Fill="{DynamicResource DARKPrimaryTrans4}" /> <Rectangle Grid.Column="1" Margin="10,0,10,0" Width="1" Fill="{DynamicResource DARKPrimaryTrans4}" />
<ListBox x:Name="LsbSortAsc" Grid.Column="2" Background="Transparent" BorderThickness="0" <ListBox x:Name="LsbSortAsc" Grid.Column="2" Background="Transparent" BorderThickness="0"

View File

@ -158,6 +158,12 @@ namespace VPet_Simulator.Windows
else else
ordered = foods.OrderByDescending(x => x.Exp); ordered = foods.OrderByDescending(x => x.Exp);
break; break;
case 8:
if (sortasc)
ordered = foods.OrderBy(x => x.Likability);
else
ordered = foods.OrderByDescending(x => x.Likability);
break;
} }
Dispatcher.Invoke(() => Dispatcher.Invoke(() =>
{ {