mirror of
https://github.com/osukey/osukey.git
synced 2025-06-06 20:15:29 +09:00
Move checks out of PopIn()
This commit is contained in:
parent
dd42c89260
commit
261fae6873
@ -2,6 +2,7 @@
|
|||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
@ -50,7 +51,8 @@ namespace osu.Game.Screens.Ranking.Expanded.Statistics
|
|||||||
|
|
||||||
private void setPerformanceValue(PerformanceBreakdown breakdown)
|
private void setPerformanceValue(PerformanceBreakdown breakdown)
|
||||||
{
|
{
|
||||||
if (breakdown != null)
|
// Don't display the tooltip if "Total" is the only item
|
||||||
|
if (breakdown != null && breakdown.Performance.GetAttributesForDisplay().Count() > 1)
|
||||||
{
|
{
|
||||||
TooltipContent = breakdown;
|
TooltipContent = breakdown;
|
||||||
performance.Value = (int)Math.Round(breakdown.Performance.Total, MidpointRounding.AwayFromZero);
|
performance.Value = (int)Math.Round(breakdown.Performance.Total, MidpointRounding.AwayFromZero);
|
||||||
|
@ -56,12 +56,7 @@ namespace osu.Game.Screens.Ranking.Expanded.Statistics
|
|||||||
textColour = colours.BlueLighter;
|
textColour = colours.BlueLighter;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void PopIn()
|
protected override void PopIn() => this.FadeIn(200, Easing.OutQuint);
|
||||||
{
|
|
||||||
// Don't display the tooltip if "Total" is the only item
|
|
||||||
if (currentPerformance.Performance.GetAttributesForDisplay().Count() > 1)
|
|
||||||
this.FadeIn(200, Easing.OutQuint);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void PopOut() => this.FadeOut(200, Easing.OutQuint);
|
protected override void PopOut() => this.FadeOut(200, Easing.OutQuint);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user