1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-21 06:02:56 +08:00

MultiplayerRoom -> Room

This commit is contained in:
DrabWeb 2017-05-22 12:44:58 -03:00
parent 87cdf5aac6
commit 03f6cded84
5 changed files with 13 additions and 13 deletions

View File

@ -11,7 +11,7 @@ using osu.Game.Database;
namespace osu.Desktop.VisualTests.Tests namespace osu.Desktop.VisualTests.Tests
{ {
internal class TestCaseDrawableMultiplayerRoom : TestCase internal class TestCaseDrawableRoom : TestCase
{ {
public override string Description => @"Select your favourite room"; public override string Description => @"Select your favourite room";
@ -19,7 +19,7 @@ namespace osu.Desktop.VisualTests.Tests
{ {
base.Reset(); base.Reset();
DrawableMultiplayerRoom p; DrawableRoom p;
Add(new FillFlowContainer Add(new FillFlowContainer
{ {
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
@ -29,14 +29,14 @@ namespace osu.Desktop.VisualTests.Tests
Direction = FillDirection.Vertical, Direction = FillDirection.Vertical,
Children = new Drawable[] Children = new Drawable[]
{ {
p = new DrawableMultiplayerRoom(new MultiplayerRoom p = new DrawableRoom(new Room
{ {
Name = @"Great Room Right Here", Name = @"Great Room Right Here",
Host = new User { Username = @"Naeferith", Id = 9492835, Country = new Country { FlagName = @"FR" }}, Host = new User { Username = @"Naeferith", Id = 9492835, Country = new Country { FlagName = @"FR" }},
Status = MultiplayerRoomStatus.Open, Status = MultiplayerRoomStatus.Open,
CurrentBeatmap = new BeatmapMetadata { Title = @"Seiryu", Artist = @"Critical Crystal" }, CurrentBeatmap = new BeatmapMetadata { Title = @"Seiryu", Artist = @"Critical Crystal" },
}), }),
new DrawableMultiplayerRoom(new MultiplayerRoom new DrawableRoom(new Room
{ {
Name = @"Relax It's The Weekend", Name = @"Relax It's The Weekend",
Host = new User{ Username = @"peppy", Id = 2, Country = new Country { FlagName = @"AU" }}, Host = new User{ Username = @"peppy", Id = 2, Country = new Country { FlagName = @"AU" }},

View File

@ -220,7 +220,7 @@
<Compile Include="Tests\TestCaseLeaderboard.cs" /> <Compile Include="Tests\TestCaseLeaderboard.cs" />
<Compile Include="Beatmaps\TestWorkingBeatmap.cs" /> <Compile Include="Beatmaps\TestWorkingBeatmap.cs" />
<Compile Include="Tests\TestCaseBeatmapDetailArea.cs" /> <Compile Include="Tests\TestCaseBeatmapDetailArea.cs" />
<Compile Include="Tests\TestCaseDrawableMultiplayerRoom.cs" /> <Compile Include="Tests\TestCaseDrawableRoom.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup /> <ItemGroup />
<ItemGroup /> <ItemGroup />

View File

@ -7,7 +7,7 @@ using osu.Game.Users;
namespace osu.Game.Online.Multiplayer namespace osu.Game.Online.Multiplayer
{ {
public class MultiplayerRoom public class Room
{ {
public string Name { get; set; } public string Name { get; set; }
public User Host { get; set; } public User Host { get; set; }

View File

@ -18,7 +18,7 @@ using osu.Game.Users;
namespace osu.Game.Screens.Multiplayer namespace osu.Game.Screens.Multiplayer
{ {
public class DrawableMultiplayerRoom : ClickableContainer public class DrawableRoom : ClickableContainer
{ {
private const float content_padding = 5; private const float content_padding = 5;
private const float height = 90; private const float height = 90;
@ -39,11 +39,11 @@ namespace osu.Game.Screens.Multiplayer
private Color4 playingColour; private Color4 playingColour;
private LocalisationEngine localisation; private LocalisationEngine localisation;
public readonly Bindable<MultiplayerRoom> Room; public readonly Bindable<Room> Room;
public DrawableMultiplayerRoom(MultiplayerRoom room) public DrawableRoom(Room room)
{ {
Room = new Bindable<MultiplayerRoom>(room); Room = new Bindable<Room>(room);
RelativeSizeAxes = Axes.X; RelativeSizeAxes = Axes.X;
Height = height; Height = height;
@ -206,7 +206,7 @@ namespace osu.Game.Screens.Multiplayer
Room.TriggerChange(); Room.TriggerChange();
} }
private void displayRoom(MultiplayerRoom room) private void displayRoom(Room room)
{ {
name.Text = room.Name; name.Text = room.Name;
status.Text = room.Status.GetDescription(); status.Text = room.Status.GetDescription();

View File

@ -425,8 +425,8 @@
<Compile Include="Overlays\Music\PlaylistOverlay.cs" /> <Compile Include="Overlays\Music\PlaylistOverlay.cs" />
<Compile Include="Rulesets\Replays\IAutoGenerator.cs" /> <Compile Include="Rulesets\Replays\IAutoGenerator.cs" />
<Compile Include="Rulesets\Replays\AutoGenerator.cs" /> <Compile Include="Rulesets\Replays\AutoGenerator.cs" />
<Compile Include="Screens\Multiplayer\DrawableMultiplayerRoom.cs" /> <Compile Include="Screens\Multiplayer\DrawableRoom.cs" />
<Compile Include="Online\Multiplayer\MultiplayerRoom.cs" /> <Compile Include="Online\Multiplayer\Room.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\osu-framework\osu.Framework\osu.Framework.csproj"> <ProjectReference Include="..\osu-framework\osu.Framework\osu.Framework.csproj">