1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 15:53:21 +08:00

Warning fixes

This commit is contained in:
EVAST9919 2019-02-06 01:48:43 +03:00
parent c85dc1a236
commit 9cca11fb0d
4 changed files with 8 additions and 20 deletions

View File

@ -4,12 +4,8 @@
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Input.Events;
using osu.Game.Graphics.Containers;
using osu.Game.Graphics.Sprites;
using osu.Game.Users;
using System.Collections.Generic;
namespace osu.Game.Overlays.BeatmapSet.Scores
{
@ -30,7 +26,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
}
}
public ClickableUserContainer()
protected ClickableUserContainer()
{
AutoSizeAxes = Axes.Both;
}

View File

@ -8,17 +8,14 @@ using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Input.Events;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Online.API.Requests.Responses;
using osu.Game.Online.Leaderboards;
using osu.Game.Overlays.Profile.Sections.Ranks;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Scoring;
using osu.Game.Rulesets.UI;
using osu.Game.Users;
using osuTK;
using osuTK.Graphics;
using System.Collections.Generic;
namespace osu.Game.Overlays.BeatmapSet.Scores
{
@ -27,7 +24,6 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
private const int fade_duration = 100;
private const float text_size = 14;
private readonly Box background;
private readonly Box hoveredBackground;
private readonly SpriteText rank;
private readonly SpriteText scoreText;
@ -42,11 +38,11 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
private readonly ClickableScoreUsername username;
private readonly APIScoreInfo score;
private Color4 backgroundColor;
public DrawableScore(int index, APIScoreInfo score)
{
FillFlowContainer modsContainer;
Box background;
this.score = score;
@ -196,8 +192,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
hitMeh.Colour = (score.Statistics[HitResult.Meh] == 0) ? Color4.Gray : Color4.Black;
hitMiss.Colour = (score.Statistics[HitResult.Miss] == 0) ? Color4.Gray : Color4.Black;
background.Colour = backgroundColor = (index % 2 == 0) ? Color4.WhiteSmoke : Color4.White;
background.Colour = (index % 2 == 0) ? Color4.WhiteSmoke : Color4.White;
foreach (Mod mod in score.Mods)
modsContainer.Add(new ModIcon(mod)

View File

@ -10,10 +10,8 @@ using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Input.Events;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Online.API.Requests.Responses;
using osu.Game.Online.Leaderboards;
using osu.Game.Overlays.Profile.Sections.Ranks;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Scoring;
using osu.Game.Rulesets.UI;
@ -264,7 +262,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
private class ClickableTopScoreUsername : ClickableUserContainer
{
private const float fade_duration = 500;
private const float username_fade_duration = 500;
private readonly Box underscore;
private readonly Container underscoreContainer;
@ -317,15 +315,15 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
protected override bool OnHover(HoverEvent e)
{
text.FadeColour(hoverColour, fade_duration, Easing.OutQuint);
underscore.FadeIn(fade_duration, Easing.OutQuint);
text.FadeColour(hoverColour, username_fade_duration, Easing.OutQuint);
underscore.FadeIn(username_fade_duration, Easing.OutQuint);
return base.OnHover(e);
}
protected override void OnHoverLost(HoverLostEvent e)
{
text.FadeColour(Color4.Black, fade_duration, Easing.OutQuint);
underscore.FadeOut(fade_duration, Easing.OutQuint);
text.FadeColour(Color4.Black, username_fade_duration, Easing.OutQuint);
underscore.FadeOut(username_fade_duration, Easing.OutQuint);
base.OnHoverLost(e);
}
}

View File

@ -5,7 +5,6 @@ using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Localisation;
using osu.Game.Graphics;
namespace osu.Game.Overlays.BeatmapSet.Scores