mirror of
https://github.com/ppy/osu.git
synced 2025-01-30 08:52:58 +08:00
Merge pull request #5155 from peppy/one-hit-screen
Add base class for startup screens
This commit is contained in:
commit
681759582b
@ -9,22 +9,13 @@ using osu.Framework.Graphics.Shaders;
|
|||||||
using osu.Game.Screens.Menu;
|
using osu.Game.Screens.Menu;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
using osu.Framework.Screens;
|
using osu.Framework.Screens;
|
||||||
using osu.Game.Overlays;
|
|
||||||
|
|
||||||
namespace osu.Game.Screens
|
namespace osu.Game.Screens
|
||||||
{
|
{
|
||||||
public class Loader : OsuScreen
|
public class Loader : StartupScreen
|
||||||
{
|
{
|
||||||
private bool showDisclaimer;
|
private bool showDisclaimer;
|
||||||
|
|
||||||
public override bool HideOverlaysOnEnter => true;
|
|
||||||
|
|
||||||
public override OverlayActivation InitialOverlayActivationMode => OverlayActivation.Disabled;
|
|
||||||
|
|
||||||
public override bool CursorVisible => false;
|
|
||||||
|
|
||||||
public override bool AllowBackButton => false;
|
|
||||||
|
|
||||||
public Loader()
|
public Loader()
|
||||||
{
|
{
|
||||||
ValidForResume = false;
|
ValidForResume = false;
|
||||||
|
@ -15,12 +15,11 @@ using osu.Game.Graphics.Containers;
|
|||||||
using osu.Game.Online.API;
|
using osu.Game.Online.API;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
using osu.Game.Overlays;
|
|
||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Menu
|
namespace osu.Game.Screens.Menu
|
||||||
{
|
{
|
||||||
public class Disclaimer : OsuScreen
|
public class Disclaimer : StartupScreen
|
||||||
{
|
{
|
||||||
private Intro intro;
|
private Intro intro;
|
||||||
private SpriteIcon icon;
|
private SpriteIcon icon;
|
||||||
@ -28,13 +27,6 @@ namespace osu.Game.Screens.Menu
|
|||||||
private LinkFlowContainer textFlow;
|
private LinkFlowContainer textFlow;
|
||||||
private LinkFlowContainer supportFlow;
|
private LinkFlowContainer supportFlow;
|
||||||
|
|
||||||
public override bool HideOverlaysOnEnter => true;
|
|
||||||
public override OverlayActivation InitialOverlayActivationMode => OverlayActivation.Disabled;
|
|
||||||
|
|
||||||
public override bool AllowBackButton => false;
|
|
||||||
|
|
||||||
public override bool CursorVisible => false;
|
|
||||||
|
|
||||||
private Drawable heart;
|
private Drawable heart;
|
||||||
|
|
||||||
private const float icon_y = -85;
|
private const float icon_y = -85;
|
||||||
|
@ -15,11 +15,10 @@ using osu.Game.IO.Archives;
|
|||||||
using osu.Game.Screens.Backgrounds;
|
using osu.Game.Screens.Backgrounds;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
using osu.Game.Overlays;
|
|
||||||
|
|
||||||
namespace osu.Game.Screens.Menu
|
namespace osu.Game.Screens.Menu
|
||||||
{
|
{
|
||||||
public class Intro : OsuScreen
|
public class Intro : StartupScreen
|
||||||
{
|
{
|
||||||
private const string menu_music_beatmap_hash = "3c8b1fcc9434dbb29e2fb613d3b9eada9d7bb6c125ceb32396c3b53437280c83";
|
private const string menu_music_beatmap_hash = "3c8b1fcc9434dbb29e2fb613d3b9eada9d7bb6c125ceb32396c3b53437280c83";
|
||||||
|
|
||||||
@ -32,13 +31,6 @@ namespace osu.Game.Screens.Menu
|
|||||||
private SampleChannel welcome;
|
private SampleChannel welcome;
|
||||||
private SampleChannel seeya;
|
private SampleChannel seeya;
|
||||||
|
|
||||||
public override bool AllowBackButton => false;
|
|
||||||
|
|
||||||
public override bool HideOverlaysOnEnter => true;
|
|
||||||
public override OverlayActivation InitialOverlayActivationMode => OverlayActivation.Disabled;
|
|
||||||
|
|
||||||
public override bool CursorVisible => false;
|
|
||||||
|
|
||||||
protected override BackgroundScreen CreateBackground() => new BackgroundScreenBlack();
|
protected override BackgroundScreen CreateBackground() => new BackgroundScreenBlack();
|
||||||
|
|
||||||
private Bindable<bool> menuVoice;
|
private Bindable<bool> menuVoice;
|
||||||
|
21
osu.Game/Screens/StartupScreen.cs
Normal file
21
osu.Game/Screens/StartupScreen.cs
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
// 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;
|
||||||
|
|
||||||
|
namespace osu.Game.Screens
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// A screen which is shown once as part of the startup procedure.
|
||||||
|
/// </summary>
|
||||||
|
public abstract class StartupScreen : OsuScreen
|
||||||
|
{
|
||||||
|
public override bool AllowBackButton => false;
|
||||||
|
|
||||||
|
public override bool HideOverlaysOnEnter => true;
|
||||||
|
|
||||||
|
public override bool CursorVisible => false;
|
||||||
|
|
||||||
|
public override OverlayActivation InitialOverlayActivationMode => OverlayActivation.Disabled;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user