diff --git a/osu.Game/GameModes/BackgroundMode.cs b/osu.Game/GameModes/BackgroundMode.cs index e8c25d3f82..ee7a016b05 100644 --- a/osu.Game/GameModes/BackgroundMode.cs +++ b/osu.Game/GameModes/BackgroundMode.cs @@ -8,7 +8,6 @@ using System.Text; using System.Threading.Tasks; using osu.Framework.GameModes; using osu.Framework.Graphics.Transformations; -using osu.Game.Graphics.Background; using OpenTK; namespace osu.Game.GameModes @@ -61,35 +60,4 @@ namespace osu.Game.GameModes base.OnResuming(last); } } - - public class BackgroundModeDefault : BackgroundMode - { - public override void Load() - { - base.Load(); - - Add(new Background()); - } - } - - public class BackgroundModeCustom : BackgroundMode - { - private readonly string textureName; - - public BackgroundModeCustom(string textureName) - { - this.textureName = textureName; - } - - public override void Load() - { - base.Load(); - Add(new Background(textureName)); - } - - public override bool Equals(BackgroundMode other) - { - return base.Equals(other) && textureName == ((BackgroundModeCustom)other).textureName; - } - } } diff --git a/osu.Game/GameModes/Backgrounds/BackgroundModeCustom.cs b/osu.Game/GameModes/Backgrounds/BackgroundModeCustom.cs new file mode 100644 index 0000000000..ae8e2d916e --- /dev/null +++ b/osu.Game/GameModes/Backgrounds/BackgroundModeCustom.cs @@ -0,0 +1,28 @@ +//Copyright (c) 2007-2016 ppy Pty Ltd . +//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Graphics.Background; + +namespace osu.Game.GameModes.Backgrounds +{ + public class BackgroundModeCustom : BackgroundMode + { + private readonly string textureName; + + public BackgroundModeCustom(string textureName) + { + this.textureName = textureName; + } + + public override void Load() + { + base.Load(); + Add(new Background(textureName)); + } + + public override bool Equals(BackgroundMode other) + { + return base.Equals(other) && textureName == ((BackgroundModeCustom)other).textureName; + } + } +} \ No newline at end of file diff --git a/osu.Game/GameModes/Backgrounds/BackgroundModeDefault.cs b/osu.Game/GameModes/Backgrounds/BackgroundModeDefault.cs new file mode 100644 index 0000000000..0683a267a5 --- /dev/null +++ b/osu.Game/GameModes/Backgrounds/BackgroundModeDefault.cs @@ -0,0 +1,17 @@ +//Copyright (c) 2007-2016 ppy Pty Ltd . +//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Graphics.Background; + +namespace osu.Game.GameModes.Backgrounds +{ + public class BackgroundModeDefault : BackgroundMode + { + public override void Load() + { + base.Load(); + + Add(new Background()); + } + } +} \ No newline at end of file diff --git a/osu.Game/GameModes/Backgrounds/BackgroundModeEmpty.cs b/osu.Game/GameModes/Backgrounds/BackgroundModeEmpty.cs new file mode 100644 index 0000000000..6f38c03010 --- /dev/null +++ b/osu.Game/GameModes/Backgrounds/BackgroundModeEmpty.cs @@ -0,0 +1,10 @@ +//Copyright (c) 2007-2016 ppy Pty Ltd . +//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +namespace osu.Game.GameModes.Backgrounds +{ + public class BackgroundModeEmpty : BackgroundMode + { + + } +} \ No newline at end of file diff --git a/osu.Game/GameModes/Edit/EditSongSelect.cs b/osu.Game/GameModes/Edit/EditSongSelect.cs index 3578aecb35..c4686b03ac 100644 --- a/osu.Game/GameModes/Edit/EditSongSelect.cs +++ b/osu.Game/GameModes/Edit/EditSongSelect.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; +using osu.Game.GameModes.Backgrounds; namespace osu.Game.GameModes.Edit { diff --git a/osu.Game/GameModes/Edit/Editor.cs b/osu.Game/GameModes/Edit/Editor.cs index c7027a9479..9330d57ec6 100644 --- a/osu.Game/GameModes/Edit/Editor.cs +++ b/osu.Game/GameModes/Edit/Editor.cs @@ -7,6 +7,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using osu.Framework.GameModes; +using osu.Game.GameModes.Backgrounds; using OpenTK.Graphics; namespace osu.Game.GameModes.Edit diff --git a/osu.Game/GameModes/GameModeWhiteBox.cs b/osu.Game/GameModes/GameModeWhiteBox.cs index 4eb8945f04..25f22f8278 100644 --- a/osu.Game/GameModes/GameModeWhiteBox.cs +++ b/osu.Game/GameModes/GameModeWhiteBox.cs @@ -10,6 +10,7 @@ using osu.Framework.Graphics.Drawables; using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Transformations; using osu.Framework.Graphics.UserInterface; +using osu.Game.GameModes.Backgrounds; using OpenTK; using OpenTK.Graphics; diff --git a/osu.Game/GameModes/Menu/Intro.cs b/osu.Game/GameModes/Menu/Intro.cs index 7d20f65469..40f4a93d87 100644 --- a/osu.Game/GameModes/Menu/Intro.cs +++ b/osu.Game/GameModes/Menu/Intro.cs @@ -5,11 +5,14 @@ using System; using osu.Framework.Audio.Sample; using osu.Framework.Audio.Track; using osu.Framework.GameModes; +using osu.Game.GameModes.Backgrounds; namespace osu.Game.GameModes.Menu { class Intro : OsuGameMode { + protected override BackgroundMode CreateBackground() => new BackgroundModeEmpty(); + public override void Load() { base.Load(); diff --git a/osu.Game/GameModes/Menu/MainMenu.cs b/osu.Game/GameModes/Menu/MainMenu.cs index dcb3498e6a..962dde2fbc 100644 --- a/osu.Game/GameModes/Menu/MainMenu.cs +++ b/osu.Game/GameModes/Menu/MainMenu.cs @@ -7,6 +7,7 @@ using osu.Framework.GameModes; using osu.Framework.GameModes.Testing; using osu.Framework.Graphics; using osu.Framework.Graphics.Transformations; +using osu.Game.GameModes.Backgrounds; using osu.Game.GameModes.Charts; using osu.Game.GameModes.Direct; using osu.Game.GameModes.Edit; diff --git a/osu.Game/GameModes/Multiplayer/Match.cs b/osu.Game/GameModes/Multiplayer/Match.cs index 5e31976764..330cb94374 100644 --- a/osu.Game/GameModes/Multiplayer/Match.cs +++ b/osu.Game/GameModes/Multiplayer/Match.cs @@ -7,6 +7,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using osu.Framework.GameModes; +using osu.Game.GameModes.Backgrounds; using osu.Game.GameModes.Play; using OpenTK.Graphics; diff --git a/osu.Game/GameModes/Multiplayer/MatchSongSelect.cs b/osu.Game/GameModes/Multiplayer/MatchSongSelect.cs index eebf8868e8..da86641c04 100644 --- a/osu.Game/GameModes/Multiplayer/MatchSongSelect.cs +++ b/osu.Game/GameModes/Multiplayer/MatchSongSelect.cs @@ -7,6 +7,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using osu.Framework.GameModes; +using osu.Game.GameModes.Backgrounds; using OpenTK.Graphics; namespace osu.Game.GameModes.Multiplayer diff --git a/osu.Game/GameModes/Play/ModSelect.cs b/osu.Game/GameModes/Play/ModSelect.cs index e6db9dd60a..bbdc7bf6ce 100644 --- a/osu.Game/GameModes/Play/ModSelect.cs +++ b/osu.Game/GameModes/Play/ModSelect.cs @@ -8,6 +8,7 @@ using System.Text; using System.Threading.Tasks; using OpenTK.Graphics; using osu.Framework.GameModes; +using osu.Game.GameModes.Backgrounds; namespace osu.Game.GameModes.Play { diff --git a/osu.Game/GameModes/Play/PlaySongSelect.cs b/osu.Game/GameModes/Play/PlaySongSelect.cs index 6ac557534d..3346ae137d 100644 --- a/osu.Game/GameModes/Play/PlaySongSelect.cs +++ b/osu.Game/GameModes/Play/PlaySongSelect.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; +using osu.Game.GameModes.Backgrounds; namespace osu.Game.GameModes.Play { diff --git a/osu.Game/GameModes/Play/Results.cs b/osu.Game/GameModes/Play/Results.cs index 18811fd4d1..d7ba02c40f 100644 --- a/osu.Game/GameModes/Play/Results.cs +++ b/osu.Game/GameModes/Play/Results.cs @@ -7,6 +7,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using osu.Framework.GameModes; +using osu.Game.GameModes.Backgrounds; using OpenTK.Graphics; namespace osu.Game.GameModes.Play diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index a82dc20f60..7a4195cc3e 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -70,6 +70,9 @@ + + +