mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 20:32:55 +08:00
Add empty Match screen.
This commit is contained in:
parent
d090323c00
commit
ab3ac49a2d
23
osu.Game.Tests/Visual/TestCaseMatch.cs
Normal file
23
osu.Game.Tests/Visual/TestCaseMatch.cs
Normal file
@ -0,0 +1,23 @@
|
||||
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Game.Online.Multiplayer;
|
||||
using osu.Game.Screens.Multi.Screens.Match;
|
||||
|
||||
namespace osu.Game.Tests.Visual
|
||||
{
|
||||
public class TestCaseMatch : OsuTestCase
|
||||
{
|
||||
public TestCaseMatch()
|
||||
{
|
||||
Room room = new Room
|
||||
{
|
||||
};
|
||||
|
||||
Match match = new Match(room);
|
||||
|
||||
AddStep(@"show", () => Add(match));
|
||||
AddStep(@"exit", match.Exit);
|
||||
}
|
||||
}
|
||||
}
|
@ -164,7 +164,7 @@ namespace osu.Game.Screens.Multi.Screens.Lounge
|
||||
|
||||
// open the room if its selected and is clicked again
|
||||
if (room.State == SelectionState.Selected)
|
||||
Push(new Match());
|
||||
Push(new Match.Match(room.Room));
|
||||
}
|
||||
|
||||
private class RoomsFilterContainer : FillFlowContainer<DrawableRoom>, IHasFilterableChildren
|
||||
|
@ -1,37 +0,0 @@
|
||||
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Screens;
|
||||
using osu.Game.Screens.Backgrounds;
|
||||
using osu.Game.Screens.Play;
|
||||
using osu.Game.Screens.Select;
|
||||
using OpenTK.Graphics;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Screens
|
||||
{
|
||||
public class Match : ScreenWhiteBox
|
||||
{
|
||||
protected override IEnumerable<Type> PossibleChildren => new[] {
|
||||
typeof(MatchSongSelect),
|
||||
typeof(Player),
|
||||
};
|
||||
|
||||
protected override BackgroundScreen CreateBackground() => new BackgroundScreenCustom(@"Backgrounds/bg4");
|
||||
|
||||
protected override void OnEntering(Screen last)
|
||||
{
|
||||
base.OnEntering(last);
|
||||
|
||||
Background.FadeColour(Color4.DarkGray, 500);
|
||||
}
|
||||
|
||||
protected override bool OnExiting(Screen next)
|
||||
{
|
||||
Background.FadeColour(Color4.White, 500);
|
||||
return base.OnExiting(next);
|
||||
}
|
||||
}
|
||||
}
|
19
osu.Game/Screens/Multi/Screens/Match/Match.cs
Normal file
19
osu.Game/Screens/Multi/Screens/Match/Match.cs
Normal file
@ -0,0 +1,19 @@
|
||||
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Game.Online.Multiplayer;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Screens.Match
|
||||
{
|
||||
public class Match : MultiplayerScreen
|
||||
{
|
||||
private readonly Room room;
|
||||
|
||||
public override string Title => room.Name.Value;
|
||||
|
||||
public Match(Room room)
|
||||
{
|
||||
this.room = room;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Screens
|
||||
{
|
||||
public class MatchCreate : ScreenWhiteBox
|
||||
{
|
||||
protected override IEnumerable<Type> PossibleChildren => new[] {
|
||||
typeof(Match)
|
||||
};
|
||||
|
||||
public MatchCreate()
|
||||
{
|
||||
ValidForResume = false;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user