1
0
mirror of synced 2024-11-13 18:10:52 +01:00

Add score rank icons

This commit is contained in:
shiibe 2022-09-10 11:20:48 -04:00
parent f5bb98d5da
commit d4b1d0516d
8 changed files with 33 additions and 8 deletions

View File

@ -41,6 +41,12 @@ else
</CellTemplate>
</Column>
<Column T="SongBestData" Field="@nameof(SongBestData.BestScore)" Title="Best Score"/>
<Column T="SongBestData" Field="@nameof(SongBestData.GoodCount)" Title="Good" />
<Column T="SongBestData" Field="@nameof(SongBestData.OkCount)" Title="Ok" />
<Column T="SongBestData" Field="@nameof(SongBestData.MissCount)" Title="Bad" />
<Column T="SongBestData" Field="@nameof(SongBestData.DrumrollCount)" Title="Drum Rolls" />
<Column T="SongBestData" Field="@nameof(SongBestData.ComboCount)" Title="Max Combo" />
@*<Column T="SongBestData" Field="@nameof(SongBestData.HitCount)" Title="Hit" />*@
<Column T="SongBestData" Field="@nameof(SongBestData.BestCrown)" Title="Best Crown">
<CellTemplate>
<MudTooltip Text="@(GetCrownText(context.Item.BestCrown))" Arrow="true" Placement="Placement.Top">
@ -48,14 +54,17 @@ else
</MudTooltip>
</CellTemplate>
</Column>
<Column T="SongBestData" Field="@nameof(SongBestData.BestScoreRank)" Title="Best Rank" />
<Column T="SongBestData" Field="@nameof(SongBestData.BestRate)" Title="Best Rate"/>
<Column T="SongBestData" Field="@nameof(SongBestData.GoodCount)" Title="Good"/>
<Column T="SongBestData" Field="@nameof(SongBestData.OkCount)" Title="Ok"/>
<Column T="SongBestData" Field="@nameof(SongBestData.MissCount)" Title="Miss"/>
<Column T="SongBestData" Field="@nameof(SongBestData.ComboCount)" Title="Max Combo"/>
<Column T="SongBestData" Field="@nameof(SongBestData.DrumrollCount)" Title="Drum Rolls"/>
<Column T="SongBestData" Field="@nameof(SongBestData.HitCount)" Title="Hit"/>
<Column T="SongBestData" Field="@nameof(SongBestData.BestScoreRank)" Title="Best Rank">
<CellTemplate>
@if (context.Item.BestScoreRank is not ScoreRank.None)
{
<MudTooltip Text="@(getRankText(context.Item.BestScoreRank))" Arrow="true" Placement="Placement.Top">
<img src="@($"/images/rank_{context.Item.BestScoreRank}.png")" alt="@(context.Item.BestScoreRank)" style="@ICON_STYLE" />
</MudTooltip>
}
</CellTemplate>
</Column>
@*<Column T="SongBestData" Field="@nameof(SongBestData.BestRate)" Title="Best Rate"/>*@
<Column T="SongBestData" Field="@nameof(SongBestData.IsFavorite)" Title="Favorite">
<CellTemplate>
<MudToggleIconButton Toggled="@context.Item.IsFavorite"
@ -126,4 +135,20 @@ else
};
}
private string getRankText(ScoreRank rank)
{
return rank switch
{
ScoreRank.None => "None",
ScoreRank.White => "Stylish (White)",
ScoreRank.Bronze => "Stylish (Bronze)",
ScoreRank.Silver => "Stylish (Silver)",
ScoreRank.Gold => "Graceful (Gold)",
ScoreRank.Sakura => "Graceful (Sakura)",
ScoreRank.Purple => "Graceful (Purple)",
ScoreRank.Dondaful => "Top Class (Donderful)",
_ => ""
};
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB