osu/osu.Game.Tests/Visual/Online/TestSceneNewsOverlay.cs

26 lines
759 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;
2019-08-10 10:26:54 +00:00
namespace osu.Game.Tests.Visual.Online
{
public class TestSceneNewsOverlay : OsuTestScene
{
2020-07-08 17:17:15 +00:00
private NewsOverlay news;
2019-08-10 10:26:54 +00:00
2020-07-08 17:07:29 +00:00
protected override bool UseOnlineAPI => true;
2019-08-10 10:26:54 +00:00
protected override void LoadComplete()
{
base.LoadComplete();
2020-07-08 17:17:15 +00:00
Add(news = new NewsOverlay());
2019-08-10 10:26:54 +00:00
AddStep(@"Show", news.Show);
AddStep(@"Hide", news.Hide);
2019-08-10 15:06:52 +00:00
AddStep(@"Show front page", () => news.ShowFrontPage());
AddStep(@"Custom article", () => news.Current.Value = "Test Article 101");
}
2019-08-10 10:26:54 +00:00
}
}