1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 12:33:01 +08:00

Bring up-to-date with code changes

This commit is contained in:
Dean Herbert 2020-12-15 15:22:14 +09:00
parent 70e5d4495a
commit 8362ad37e3
2 changed files with 13 additions and 16 deletions

View File

@ -1,12 +1,11 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. 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<Type> 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()
{

View File

@ -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),
}
}