mirror of
https://github.com/osukey/osukey.git
synced 2025-05-09 15:47:38 +09:00
Don't use ProfileShowMoreButton in the test scene to avoid confusion
This commit is contained in:
parent
0fd6b0c852
commit
42a06a54ff
@ -1,11 +1,12 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// 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.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using osu.Game.Overlays.Profile.Sections;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Game.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual.Online
|
namespace osu.Game.Tests.Visual.Online
|
||||||
{
|
{
|
||||||
@ -18,11 +19,11 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
|
|
||||||
public TestSceneShowMoreButton()
|
public TestSceneShowMoreButton()
|
||||||
{
|
{
|
||||||
ProfileShowMoreButton button = null;
|
TestButton button = null;
|
||||||
|
|
||||||
int fireCount = 0;
|
int fireCount = 0;
|
||||||
|
|
||||||
Add(button = new ProfileShowMoreButton
|
Add(button = new TestButton
|
||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
@ -52,5 +53,16 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
AddAssert("action fired twice", () => fireCount == 2);
|
AddAssert("action fired twice", () => fireCount == 2);
|
||||||
AddAssert("is in loading state", () => button.IsLoading);
|
AddAssert("is in loading state", () => button.IsLoading);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private class TestButton : ShowMoreButton
|
||||||
|
{
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load(OsuColour colors)
|
||||||
|
{
|
||||||
|
IdleColour = colors.YellowDark;
|
||||||
|
HoverColour = colors.Yellow;
|
||||||
|
ChevronIconColour = colors.Red;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user