mirror of
https://github.com/osukey/osukey.git
synced 2025-08-02 22:26:41 +09:00
TotalCommentsCounter implementation
This commit is contained in:
@ -0,0 +1,36 @@
|
||||
// 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 osu.Framework.Graphics;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Game.Overlays.Comments;
|
||||
using osu.Framework.MathUtils;
|
||||
|
||||
namespace osu.Game.Tests.Visual.Online
|
||||
{
|
||||
public class TestSceneTotalCommentsCounter : OsuTestScene
|
||||
{
|
||||
public override IReadOnlyList<Type> RequiredTypes => new[]
|
||||
{
|
||||
typeof(TotalCommentsCounter),
|
||||
};
|
||||
|
||||
public TestSceneTotalCommentsCounter()
|
||||
{
|
||||
var count = new BindableInt();
|
||||
|
||||
Add(new TotalCommentsCounter
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Current = { BindTarget = count }
|
||||
});
|
||||
|
||||
AddStep(@"Set 100", () => count.Value = 100);
|
||||
AddStep(@"Set 0", () => count.Value = 0);
|
||||
AddStep(@"Set random", () => count.Value = RNG.Next(0, int.MaxValue));
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user