1
0
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:
DrabWeb 2018-05-28 21:01:56 -03:00
parent d090323c00
commit ab3ac49a2d
5 changed files with 43 additions and 58 deletions

View 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);
}
}
}

View File

@ -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

View File

@ -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);
}
}
}

View 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;
}
}
}

View File

@ -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;
}
}
}