1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-13 08:32:57 +08:00

Improve white-boxed game modes.

This commit is contained in:
Dean Herbert 2016-10-05 20:03:52 +09:00
parent 4eb310c3a5
commit c0f25a2683
14 changed files with 88 additions and 11 deletions

@ -1 +1 @@
Subproject commit cc107f9bcfc8efeeff88f19c2df8cec9755eda39
Subproject commit 6d9bbe6c838e4b89b69d5ad49b37b434aa62281e

View File

@ -6,10 +6,12 @@ using System.Collections.Generic;
namespace osu.Game.GameModes.Edit
{
class SongSelectEdit : GameModeWhiteBox
class EditSongSelect : GameModeWhiteBox
{
protected override IEnumerable<Type> PossibleChildren => new[] {
typeof(Editor)
};
protected override BackgroundMode CreateBackground() => new BackgroundModeCustom(@"Backgrounds/bg4");
}
}

View File

@ -6,10 +6,25 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using osu.Framework.GameModes;
using OpenTK.Graphics;
namespace osu.Game.GameModes.Edit
{
class Editor : GameModeWhiteBox
{
protected override BackgroundMode CreateBackground() => new BackgroundModeCustom(@"Backgrounds/bg4");
protected override void OnEntering(GameMode last)
{
base.OnEntering(last);
Background.FadeColour(Color4.DarkGray, 500);
}
protected override void OnExiting(GameMode next)
{
base.OnExiting(next);
Background.FadeColour(Color4.White, 500);
}
}
}

View File

@ -27,7 +27,7 @@ namespace osu.Game.GameModes
private Container textContainer;
private Box box;
protected override BackgroundMode CreateBackground() => new BackgroundModeCustom(@"Menu/songselect");
protected override BackgroundMode CreateBackground() => new BackgroundModeCustom(@"Backgrounds/bg2");
protected override void OnEntering(GameMode last)
{

View File

@ -50,8 +50,8 @@ namespace osu.Game.GameModes.Menu
{
OnChart = delegate { Push(new ChartListing()); },
OnDirect = delegate { Push(new OnlineListing()); },
OnEdit = delegate { Push(new SongSelectEdit()); },
OnSolo = delegate { Push(new SongSelectPlay()); },
OnEdit = delegate { Push(new EditSongSelect()); },
OnSolo = delegate { Push(new PlaySongSelect()); },
OnMulti = delegate { Push(new Lobby()); },
OnTest = delegate { Push(new TestBrowser()); },
OnExit = delegate {

View File

@ -6,7 +6,9 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using osu.Framework.GameModes;
using osu.Game.GameModes.Play;
using OpenTK.Graphics;
namespace osu.Game.GameModes.Multiplayer
{
@ -16,5 +18,19 @@ namespace osu.Game.GameModes.Multiplayer
typeof(MatchSongSelect),
typeof(Player),
};
protected override BackgroundMode CreateBackground() => new BackgroundModeCustom(@"Backgrounds/bg4");
protected override void OnEntering(GameMode last)
{
base.OnEntering(last);
Background.FadeColour(Color4.DarkGray, 500);
}
protected override void OnExiting(GameMode next)
{
base.OnExiting(next);
Background.FadeColour(Color4.White, 500);
}
}
}

View File

@ -6,10 +6,13 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using osu.Framework.GameModes;
using OpenTK.Graphics;
namespace osu.Game.GameModes.Multiplayer
{
class MatchSongSelect : GameModeWhiteBox
{
protected override BackgroundMode CreateBackground() => new BackgroundModeCustom(@"Backgrounds/bg4");
}
}

View File

@ -9,6 +9,7 @@ using System.Threading.Tasks;
using osu.Framework.GameModes;
using osu.Framework.Graphics.Containers;
using osu.Game.Graphics.Background;
using osu.Game.Graphics.Containers;
namespace osu.Game.GameModes
{
@ -40,8 +41,14 @@ namespace osu.Game.GameModes
}
else if (bg != null)
{
bg.Depth = float.MinValue;
AddTopLevel(Background = bg);
AddTopLevel(new ParallaxContainer
{
Depth = float.MinValue,
Children = new[]
{
Background = bg
}
});
}

View File

@ -6,10 +6,25 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using OpenTK.Graphics;
using osu.Framework.GameModes;
namespace osu.Game.GameModes.Play
{
class ModSelect : GameModeWhiteBox
{
protected override BackgroundMode CreateBackground() => new BackgroundModeCustom(@"Backgrounds/bg4");
protected override void OnEntering(GameMode last)
{
base.OnEntering(last);
Background.FadeColour(Color4.DarkGray, 500);
}
protected override void OnExiting(GameMode next)
{
base.OnExiting(next);
Background.FadeColour(Color4.White, 500);
}
}
}

View File

@ -6,8 +6,10 @@ using System.Collections.Generic;
namespace osu.Game.GameModes.Play
{
class SongSelectPlay : GameModeWhiteBox
class PlaySongSelect : GameModeWhiteBox
{
protected override BackgroundMode CreateBackground() => new BackgroundModeCustom(@"Backgrounds/bg4");
protected override IEnumerable<Type> PossibleChildren => new[] {
typeof(ModSelect),
typeof(Player)

View File

@ -11,6 +11,8 @@ namespace osu.Game.GameModes.Play
{
class Player : GameModeWhiteBox
{
protected override BackgroundMode CreateBackground() => new BackgroundModeCustom(@"Backgrounds/bg4");
protected override IEnumerable<Type> PossibleChildren => new[] {
typeof(Results)
};

View File

@ -6,10 +6,25 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using osu.Framework.GameModes;
using OpenTK.Graphics;
namespace osu.Game.GameModes.Play
{
class Results : GameModeWhiteBox
{
protected override BackgroundMode CreateBackground() => new BackgroundModeCustom(@"Backgrounds/bg4");
protected override void OnEntering(GameMode last)
{
base.OnEntering(last);
Background.FadeColour(Color4.DarkGray, 500);
}
protected override void OnExiting(GameMode next)
{
base.OnExiting(next);
Background.FadeColour(Color4.White, 500);
}
}
}

View File

@ -17,7 +17,7 @@ namespace osu.Game.Graphics.Background
string textureName;
public Background(string textureName = @"Menu/background")
public Background(string textureName = @"Backgrounds/bg1")
{
this.textureName = textureName;
RelativeSizeAxes = Axes.Both;

View File

@ -86,7 +86,7 @@
<Compile Include="GameModes\Play\PlayMode.cs" />
<Compile Include="GameModes\Play\Results.cs" />
<Compile Include="GameModes\Direct\OnlineListing.cs" />
<Compile Include="GameModes\Play\SongSelectPlay.cs" />
<Compile Include="GameModes\Play\PlaySongSelect.cs" />
<Compile Include="GameModes\Play\Catch\CatchHitRenderer.cs" />
<Compile Include="GameModes\Play\Catch\CatchPlayfield.cs" />
<Compile Include="GameModes\Play\HitRenderer.cs" />
@ -97,7 +97,7 @@
<Compile Include="GameModes\Play\Playfield.cs" />
<Compile Include="GameModes\Play\Taiko\TaikoHitRenderer.cs" />
<Compile Include="GameModes\Play\Taiko\TaikoPlayfield.cs" />
<Compile Include="GameModes\Edit\SongSelectEdit.cs" />
<Compile Include="GameModes\Edit\EditSongSelect.cs" />
<Compile Include="Graphics\Background\Background.cs" />
<Compile Include="Graphics\Containers\ParallaxContainer.cs" />
<Compile Include="Graphics\Cursor\OsuCursorContainer.cs" />