1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 21:27:24 +08:00
osu-lazer/osu.Game.Tests/Visual/Online/TestSceneNewsOverlay.cs

30 lines
916 B
C#
Raw Normal View History

// 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 osu.Game.Overlays;
using osu.Game.Overlays.News;
2019-08-10 18:26:54 +08:00
namespace osu.Game.Tests.Visual.Online
{
public class TestSceneNewsOverlay : OsuTestScene
{
private TestNewsOverlay news;
2019-08-10 18:26:54 +08:00
protected override void LoadComplete()
{
base.LoadComplete();
Add(news = new TestNewsOverlay());
2019-08-10 18:26:54 +08:00
AddStep(@"Show", news.Show);
AddStep(@"Hide", news.Hide);
2019-08-10 23:06:52 +08:00
AddStep(@"Show front page", () => news.ShowFrontPage());
AddStep(@"Custom article", () => news.Current.Value = "Test Article 101");
2019-08-10 18:26:54 +08:00
}
private class TestNewsOverlay : NewsOverlay
{
public new void LoadAndShowChild(NewsContent content) => base.LoadAndShowChild(content);
}
2019-08-10 18:26:54 +08:00
}
}