From 8362ad37e34c10d2ada7bd4468d851d6debdb45a Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 15 Dec 2020 15:22:14 +0900 Subject: [PATCH] Bring up-to-date with code changes --- .../Gameplay/TestSceneInGameLeaderboard.cs | 26 ++++++++----------- osu.Game/Screens/Play/InGameScoreContainer.cs | 3 ++- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/osu.Game.Tests/Visual/Gameplay/TestSceneInGameLeaderboard.cs b/osu.Game.Tests/Visual/Gameplay/TestSceneInGameLeaderboard.cs index 0019212dfa..4944a6477d 100644 --- a/osu.Game.Tests/Visual/Gameplay/TestSceneInGameLeaderboard.cs +++ b/osu.Game.Tests/Visual/Gameplay/TestSceneInGameLeaderboard.cs @@ -1,12 +1,11 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -using System; -using System.Collections.Generic; using System.Linq; using NUnit.Framework; using osu.Framework.Bindables; using osu.Framework.Graphics; +using osu.Framework.Testing; using osu.Game.Screens.Play; using osu.Game.Users; using osuTK; @@ -16,12 +15,6 @@ namespace osu.Game.Tests.Visual.Gameplay [TestFixture] public class TestSceneInGameLeaderboard : OsuTestScene { - public override IReadOnlyList RequiredTypes => new[] - { - typeof(InGameLeaderboard), - typeof(InGameScoreContainer), - }; - private readonly TestInGameLeaderboard leaderboard; private readonly BindableDouble playerScore; @@ -35,18 +28,21 @@ namespace osu.Game.Tests.Visual.Gameplay RelativeSizeAxes = Axes.X, PlayerCurrentScore = { BindTarget = playerScore = new BindableDouble(1222333) } }); + } + + [SetUpSteps] + public void SetUpSteps() + { + AddStep("reset leaderboard", () => + { + leaderboard.ClearScores(); + playerScore.Value = 1222333; + }); AddStep("add player user", () => leaderboard.PlayerUser = new User { Username = "You" }); AddSliderStep("set player score", 50, 5000000, 1222333, v => playerScore.Value = v); } - [SetUp] - public void SetUp() - { - leaderboard.ClearScores(); - playerScore.Value = 1222333; - } - [Test] public void TestPlayerScore() { diff --git a/osu.Game/Screens/Play/InGameScoreContainer.cs b/osu.Game/Screens/Play/InGameScoreContainer.cs index f548b3de3f..d3ec132351 100644 --- a/osu.Game/Screens/Play/InGameScoreContainer.cs +++ b/osu.Game/Screens/Play/InGameScoreContainer.cs @@ -6,6 +6,7 @@ using System.Linq; using Humanizer; using osu.Framework.Allocation; using osu.Framework.Bindables; +using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Game.Graphics; @@ -210,7 +211,7 @@ namespace osu.Game.Screens.Play }, scoreText = new GlowingSpriteText { - GlowColour = OsuColour.FromHex(@"83ccfa"), + GlowColour = Color4Extensions.FromHex(@"83ccfa"), Font = OsuFont.Numeric.With(size: 14), } }