mirror of
https://github.com/ppy/osu.git
synced 2025-01-22 08:32:54 +08:00
Extract OnlinePlayScreenWaveContainer
from OnlinePlayScreen
This commit is contained in:
parent
a8a2e543d5
commit
19f39ca1b6
@ -6,7 +6,6 @@
|
|||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Extensions.Color4Extensions;
|
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Logging;
|
using osu.Framework.Logging;
|
||||||
using osu.Framework.Screens;
|
using osu.Framework.Screens;
|
||||||
@ -36,7 +35,7 @@ namespace osu.Game.Screens.OnlinePlay
|
|||||||
|
|
||||||
protected LoungeSubScreen Lounge { get; private set; }
|
protected LoungeSubScreen Lounge { get; private set; }
|
||||||
|
|
||||||
private MultiplayerWaveContainer waves;
|
private OnlinePlayScreenWaveContainer waves;
|
||||||
private ScreenStack screenStack;
|
private ScreenStack screenStack;
|
||||||
|
|
||||||
[Cached(Type = typeof(IRoomManager))]
|
[Cached(Type = typeof(IRoomManager))]
|
||||||
@ -63,7 +62,7 @@ namespace osu.Game.Screens.OnlinePlay
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
InternalChild = waves = new MultiplayerWaveContainer
|
InternalChild = waves = new OnlinePlayScreenWaveContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
@ -230,19 +229,6 @@ namespace osu.Game.Screens.OnlinePlay
|
|||||||
|
|
||||||
protected abstract LoungeSubScreen CreateLounge();
|
protected abstract LoungeSubScreen CreateLounge();
|
||||||
|
|
||||||
private partial class MultiplayerWaveContainer : WaveContainer
|
|
||||||
{
|
|
||||||
protected override bool StartHidden => true;
|
|
||||||
|
|
||||||
public MultiplayerWaveContainer()
|
|
||||||
{
|
|
||||||
FirstWaveColour = Color4Extensions.FromHex(@"654d8c");
|
|
||||||
SecondWaveColour = Color4Extensions.FromHex(@"554075");
|
|
||||||
ThirdWaveColour = Color4Extensions.FromHex(@"44325e");
|
|
||||||
FourthWaveColour = Color4Extensions.FromHex(@"392850");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ScreenStack IHasSubScreenStack.SubScreenStack => screenStack;
|
ScreenStack IHasSubScreenStack.SubScreenStack => screenStack;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
22
osu.Game/Screens/OnlinePlay/OnlinePlayScreenWaveContainer.cs
Normal file
22
osu.Game/Screens/OnlinePlay/OnlinePlayScreenWaveContainer.cs
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
// 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.
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
using osu.Framework.Extensions.Color4Extensions;
|
||||||
|
using osu.Game.Graphics.Containers;
|
||||||
|
|
||||||
|
namespace osu.Game.Screens.OnlinePlay
|
||||||
|
{
|
||||||
|
public partial class OnlinePlayScreenWaveContainer : WaveContainer
|
||||||
|
{
|
||||||
|
protected override bool StartHidden => true;
|
||||||
|
|
||||||
|
public OnlinePlayScreenWaveContainer()
|
||||||
|
{
|
||||||
|
FirstWaveColour = Color4Extensions.FromHex(@"654d8c");
|
||||||
|
SecondWaveColour = Color4Extensions.FromHex(@"554075");
|
||||||
|
ThirdWaveColour = Color4Extensions.FromHex(@"44325e");
|
||||||
|
FourthWaveColour = Color4Extensions.FromHex(@"392850");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user