mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 06:57:39 +08:00
Added basic loading screen and test case
This commit is contained in:
parent
6239eab233
commit
78273d76e3
31
osu.Desktop.VisualTests/Tests/TestCasePlayerLoadingScreen.cs
Normal file
31
osu.Desktop.VisualTests/Tests/TestCasePlayerLoadingScreen.cs
Normal file
@ -0,0 +1,31 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Primitives;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Game.Database;
|
||||
using osu.Game.Screens.Select;
|
||||
using System.Linq;
|
||||
using osu.Game.Screens.Play;
|
||||
using OpenTK;
|
||||
|
||||
namespace osu.Desktop.VisualTests.Tests
|
||||
{
|
||||
public class TestCasePlayerLoadingScreen : TestCase
|
||||
{
|
||||
public override string Description => @"Loading screen in player";
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
base.Reset();
|
||||
|
||||
Add(new LoadingScreen
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
37
osu.Game/Screens/Play/LoadingScreen.cs
Normal file
37
osu.Game/Screens/Play/LoadingScreen.cs
Normal file
@ -0,0 +1,37 @@
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Primitives;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Screens;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Database;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Screens.Backgrounds;
|
||||
using osu.Game.Screens.Menu;
|
||||
using OpenTK;
|
||||
|
||||
namespace osu.Game.Screens.Play
|
||||
{
|
||||
public class LoadingScreen : OsuScreen
|
||||
{
|
||||
|
||||
private string loadingText = "loading...";
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
Add(
|
||||
new OsuSpriteText
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Text = loadingText,
|
||||
TextSize = 48,
|
||||
Font = @"Exo2.0-MediumItalic"
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user