From 9cca11fb0d71c81f930cb48dd95a6ff9962cdd8f Mon Sep 17 00:00:00 2001 From: EVAST9919 Date: Wed, 6 Feb 2019 01:48:43 +0300 Subject: [PATCH] Warning fixes --- .../BeatmapSet/Scores/ClickableUserContainer.cs | 6 +----- osu.Game/Overlays/BeatmapSet/Scores/DrawableScore.cs | 9 ++------- .../Overlays/BeatmapSet/Scores/DrawableTopScore.cs | 12 +++++------- osu.Game/Overlays/BeatmapSet/Scores/ScoreTextLine.cs | 1 - 4 files changed, 8 insertions(+), 20 deletions(-) diff --git a/osu.Game/Overlays/BeatmapSet/Scores/ClickableUserContainer.cs b/osu.Game/Overlays/BeatmapSet/Scores/ClickableUserContainer.cs index 2f402bfa74..621e1ee1f2 100644 --- a/osu.Game/Overlays/BeatmapSet/Scores/ClickableUserContainer.cs +++ b/osu.Game/Overlays/BeatmapSet/Scores/ClickableUserContainer.cs @@ -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; } diff --git a/osu.Game/Overlays/BeatmapSet/Scores/DrawableScore.cs b/osu.Game/Overlays/BeatmapSet/Scores/DrawableScore.cs index 6f6fd22a13..c2f198d3ee 100644 --- a/osu.Game/Overlays/BeatmapSet/Scores/DrawableScore.cs +++ b/osu.Game/Overlays/BeatmapSet/Scores/DrawableScore.cs @@ -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) diff --git a/osu.Game/Overlays/BeatmapSet/Scores/DrawableTopScore.cs b/osu.Game/Overlays/BeatmapSet/Scores/DrawableTopScore.cs index 7d82b05099..48b824390d 100644 --- a/osu.Game/Overlays/BeatmapSet/Scores/DrawableTopScore.cs +++ b/osu.Game/Overlays/BeatmapSet/Scores/DrawableTopScore.cs @@ -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); } } diff --git a/osu.Game/Overlays/BeatmapSet/Scores/ScoreTextLine.cs b/osu.Game/Overlays/BeatmapSet/Scores/ScoreTextLine.cs index d8655b4882..53a477b908 100644 --- a/osu.Game/Overlays/BeatmapSet/Scores/ScoreTextLine.cs +++ b/osu.Game/Overlays/BeatmapSet/Scores/ScoreTextLine.cs @@ -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