mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
Renamespace
This commit is contained in:
@ -9,7 +9,7 @@ using osu.Game.Beatmaps;
|
|||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
using osu.Game.Online.Multiplayer;
|
using osu.Game.Online.Multiplayer;
|
||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets;
|
||||||
using osu.Game.Screens.Multi.Components;
|
using osu.Game.Screens.Multi.Lounge.Components;
|
||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual
|
||||||
|
@ -10,8 +10,8 @@ using osu.Game.Online.Multiplayer;
|
|||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets;
|
||||||
using osu.Game.Screens;
|
using osu.Game.Screens;
|
||||||
using osu.Game.Screens.Backgrounds;
|
using osu.Game.Screens.Backgrounds;
|
||||||
using osu.Game.Screens.Multi.Components;
|
using osu.Game.Screens.Multi.Lounge;
|
||||||
using osu.Game.Screens.Multi.Screens.Lounge;
|
using osu.Game.Screens.Multi.Lounge.Components;
|
||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
using osuTK.Input;
|
using osuTK.Input;
|
||||||
|
|
||||||
@ -20,12 +20,12 @@ namespace osu.Game.Tests.Visual
|
|||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseLounge : ManualInputManagerTestCase
|
public class TestCaseLounge : ManualInputManagerTestCase
|
||||||
{
|
{
|
||||||
private TestLounge lounge;
|
private TestLoungeScreen loungeScreen;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(RulesetStore rulesets)
|
private void load(RulesetStore rulesets)
|
||||||
{
|
{
|
||||||
lounge = new TestLounge();
|
loungeScreen = new TestLoungeScreen();
|
||||||
|
|
||||||
Room[] rooms =
|
Room[] rooms =
|
||||||
{
|
{
|
||||||
@ -159,47 +159,47 @@ namespace osu.Game.Tests.Visual
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
AddStep(@"show", () => Add(lounge));
|
AddStep(@"show", () => Add(loungeScreen));
|
||||||
AddStep(@"set rooms", () => lounge.Rooms = rooms);
|
AddStep(@"set rooms", () => loungeScreen.Rooms = rooms);
|
||||||
selectAssert(0);
|
selectAssert(0);
|
||||||
AddStep(@"clear rooms", () => lounge.Rooms = new Room[] {});
|
AddStep(@"clear rooms", () => loungeScreen.Rooms = new Room[] {});
|
||||||
AddAssert(@"no room selected", () => lounge.SelectedRoom == null);
|
AddAssert(@"no room selected", () => loungeScreen.SelectedRoom == null);
|
||||||
AddStep(@"set rooms", () => lounge.Rooms = rooms);
|
AddStep(@"set rooms", () => loungeScreen.Rooms = rooms);
|
||||||
selectAssert(1);
|
selectAssert(1);
|
||||||
AddStep(@"open room 1", () => clickRoom(1));
|
AddStep(@"open room 1", () => clickRoom(1));
|
||||||
AddUntilStep(() => lounge.ChildScreen?.IsCurrentScreen == true, "wait until room current");
|
AddUntilStep(() => loungeScreen.ChildScreen?.IsCurrentScreen == true, "wait until room current");
|
||||||
AddStep(@"make lounge current", lounge.MakeCurrent);
|
AddStep(@"make lounge current", loungeScreen.MakeCurrent);
|
||||||
filterAssert(@"THE FINAL", LoungeTab.Public, 1);
|
filterAssert(@"THE FINAL", LoungeTab.Public, 1);
|
||||||
filterAssert(string.Empty, LoungeTab.Public, 2);
|
filterAssert(string.Empty, LoungeTab.Public, 2);
|
||||||
filterAssert(string.Empty, LoungeTab.Private, 1);
|
filterAssert(string.Empty, LoungeTab.Private, 1);
|
||||||
filterAssert(string.Empty, LoungeTab.Public, 2);
|
filterAssert(string.Empty, LoungeTab.Public, 2);
|
||||||
filterAssert(@"no matches", LoungeTab.Public, 0);
|
filterAssert(@"no matches", LoungeTab.Public, 0);
|
||||||
AddStep(@"clear rooms", () => lounge.Rooms = new Room[] {});
|
AddStep(@"clear rooms", () => loungeScreen.Rooms = new Room[] {});
|
||||||
AddStep(@"set rooms", () => lounge.Rooms = rooms);
|
AddStep(@"set rooms", () => loungeScreen.Rooms = rooms);
|
||||||
AddAssert(@"no matches after clear", () => !lounge.ChildRooms.Any());
|
AddAssert(@"no matches after clear", () => !loungeScreen.ChildRooms.Any());
|
||||||
filterAssert(string.Empty, LoungeTab.Public, 2);
|
filterAssert(string.Empty, LoungeTab.Public, 2);
|
||||||
AddStep(@"exit", lounge.Exit);
|
AddStep(@"exit", loungeScreen.Exit);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void clickRoom(int n)
|
private void clickRoom(int n)
|
||||||
{
|
{
|
||||||
InputManager.MoveMouseTo(lounge.ChildRooms.ElementAt(n));
|
InputManager.MoveMouseTo(loungeScreen.ChildRooms.ElementAt(n));
|
||||||
InputManager.Click(MouseButton.Left);
|
InputManager.Click(MouseButton.Left);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void selectAssert(int n)
|
private void selectAssert(int n)
|
||||||
{
|
{
|
||||||
AddStep($@"select room {n}", () => clickRoom(n));
|
AddStep($@"select room {n}", () => clickRoom(n));
|
||||||
AddAssert($@"room {n} selected", () => lounge.SelectedRoom == lounge.ChildRooms.ElementAt(n).Room);
|
AddAssert($@"room {n} selected", () => loungeScreen.SelectedRoom == loungeScreen.ChildRooms.ElementAt(n).Room);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void filterAssert(string filter, LoungeTab tab, int endCount)
|
private void filterAssert(string filter, LoungeTab tab, int endCount)
|
||||||
{
|
{
|
||||||
AddStep($@"filter '{filter}', {tab}", () => lounge.SetFilter(filter, tab));
|
AddStep($@"filter '{filter}', {tab}", () => loungeScreen.SetFilter(filter, tab));
|
||||||
AddAssert(@"filtered correctly", () => lounge.ChildRooms.Count() == endCount);
|
AddAssert(@"filtered correctly", () => loungeScreen.ChildRooms.Count() == endCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
private class TestLounge : Lounge
|
private class TestLoungeScreen : LoungeScreen
|
||||||
{
|
{
|
||||||
protected override BackgroundScreen CreateBackground() => new BackgroundScreenDefault();
|
protected override BackgroundScreen CreateBackground() => new BackgroundScreenDefault();
|
||||||
|
|
||||||
|
@ -8,8 +8,8 @@ using osu.Framework.Allocation;
|
|||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Online.Multiplayer;
|
using osu.Game.Online.Multiplayer;
|
||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets;
|
||||||
using osu.Game.Screens.Multi.Components;
|
using osu.Game.Screens.Multi.Match;
|
||||||
using osu.Game.Screens.Multi.Screens.Match;
|
using osu.Game.Screens.Multi.Match.Components;
|
||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual
|
||||||
@ -96,9 +96,9 @@ namespace osu.Game.Tests.Visual
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
Match match = new Match(room);
|
MatchScreen matchScreen = new MatchScreen(room);
|
||||||
|
|
||||||
AddStep(@"show", () => Add(match));
|
AddStep(@"show", () => Add(matchScreen));
|
||||||
AddStep(@"null beatmap", () => room.Beatmap.Value = null);
|
AddStep(@"null beatmap", () => room.Beatmap.Value = null);
|
||||||
AddStep(@"change name", () => room.Name.Value = @"Two Awesome Rooms");
|
AddStep(@"change name", () => room.Name.Value = @"Two Awesome Rooms");
|
||||||
AddStep(@"change status", () => room.Status.Value = new RoomStatusPlaying());
|
AddStep(@"change status", () => room.Status.Value = new RoomStatusPlaying());
|
||||||
@ -146,7 +146,7 @@ namespace osu.Game.Tests.Visual
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
AddStep(@"exit", match.Exit);
|
AddStep(@"exit", matchScreen.Exit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ using osu.Framework.Allocation;
|
|||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Online.Multiplayer;
|
using osu.Game.Online.Multiplayer;
|
||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets;
|
||||||
using osu.Game.Screens.Multi.Screens.Match;
|
using osu.Game.Screens.Multi.Match.Components;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual
|
||||||
{
|
{
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Game.Screens.Multi.Screens.Match;
|
using osu.Game.Screens.Multi.Match.Components;
|
||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Game.Screens.Multi;
|
using osu.Game.Screens.Multi;
|
||||||
using osu.Game.Screens.Multi.Screens.Lounge;
|
using osu.Game.Screens.Multi.Lounge;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual
|
||||||
{
|
{
|
||||||
@ -13,14 +13,14 @@ namespace osu.Game.Tests.Visual
|
|||||||
{
|
{
|
||||||
public TestCaseMultiHeader()
|
public TestCaseMultiHeader()
|
||||||
{
|
{
|
||||||
Lounge lounge;
|
LoungeScreen loungeScreen;
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
lounge = new Lounge
|
loungeScreen = new LoungeScreen
|
||||||
{
|
{
|
||||||
Padding = new MarginPadding { Top = Header.HEIGHT },
|
Padding = new MarginPadding { Top = Header.HEIGHT },
|
||||||
},
|
},
|
||||||
new Header(lounge),
|
new Header(loungeScreen),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,8 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using osu.Game.Screens.Multi;
|
using osu.Game.Screens.Multi;
|
||||||
using osu.Game.Screens.Multi.Screens.Lounge;
|
using osu.Game.Screens.Multi.Lounge;
|
||||||
|
using osu.Game.Screens.Multi.Lounge.Components;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual
|
||||||
{
|
{
|
||||||
@ -15,7 +16,7 @@ namespace osu.Game.Tests.Visual
|
|||||||
public override IReadOnlyList<Type> RequiredTypes => new[]
|
public override IReadOnlyList<Type> RequiredTypes => new[]
|
||||||
{
|
{
|
||||||
typeof(Multiplayer),
|
typeof(Multiplayer),
|
||||||
typeof(Lounge),
|
typeof(LoungeScreen),
|
||||||
typeof(FilterControl)
|
typeof(FilterControl)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ using osu.Framework.Graphics;
|
|||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Online.Multiplayer;
|
using osu.Game.Online.Multiplayer;
|
||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets;
|
||||||
using osu.Game.Screens.Multi.Components;
|
using osu.Game.Screens.Multi.Lounge.Components;
|
||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual
|
||||||
|
@ -8,8 +8,7 @@ using osu.Framework.Graphics;
|
|||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Testing.Input;
|
using osu.Framework.Testing.Input;
|
||||||
using osu.Game.Online.Multiplayer;
|
using osu.Game.Online.Multiplayer;
|
||||||
using osu.Game.Screens.Multi.Components;
|
using osu.Game.Screens.Multi.Match.Components;
|
||||||
using osu.Game.Screens.Multi.Screens.Match;
|
|
||||||
using osuTK.Input;
|
using osuTK.Input;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual
|
||||||
|
@ -10,7 +10,6 @@ using osu.Game.Graphics;
|
|||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
using osu.Game.Overlays.SearchableList;
|
using osu.Game.Overlays.SearchableList;
|
||||||
using osu.Game.Screens.Multi.Screens;
|
|
||||||
using osuTK;
|
using osuTK;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
namespace osu.Game.Screens.Multi.Screens
|
namespace osu.Game.Screens.Multi
|
||||||
{
|
{
|
||||||
public interface IMultiplayerScreen
|
public interface IMultiplayerScreen
|
||||||
{
|
{
|
@ -17,11 +17,12 @@ using osu.Game.Graphics.Containers;
|
|||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
using osu.Game.Online.Multiplayer;
|
using osu.Game.Online.Multiplayer;
|
||||||
|
using osu.Game.Screens.Multi.Components;
|
||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Multi.Components
|
namespace osu.Game.Screens.Multi.Lounge.Components
|
||||||
{
|
{
|
||||||
public class DrawableRoom : OsuClickableContainer, IStateful<SelectionState>, IFilterable
|
public class DrawableRoom : OsuClickableContainer, IStateful<SelectionState>, IFilterable
|
||||||
{
|
{
|
@ -6,7 +6,7 @@ using osu.Game.Online.Multiplayer;
|
|||||||
using osu.Game.Overlays.SearchableList;
|
using osu.Game.Overlays.SearchableList;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Multi.Screens.Lounge
|
namespace osu.Game.Screens.Multi.Lounge.Components
|
||||||
{
|
{
|
||||||
public class FilterControl : SearchableListFilterControl<LoungeTab, LoungeTab>
|
public class FilterControl : SearchableListFilterControl<LoungeTab, LoungeTab>
|
||||||
{
|
{
|
@ -13,7 +13,7 @@ using osu.Game.Graphics.Sprites;
|
|||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Multi.Components
|
namespace osu.Game.Screens.Multi.Lounge.Components
|
||||||
{
|
{
|
||||||
public class ParticipantInfo : Container
|
public class ParticipantInfo : Container
|
||||||
{
|
{
|
@ -17,11 +17,12 @@ using osu.Game.Graphics;
|
|||||||
using osu.Game.Graphics.Containers;
|
using osu.Game.Graphics.Containers;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
using osu.Game.Online.Multiplayer;
|
using osu.Game.Online.Multiplayer;
|
||||||
|
using osu.Game.Screens.Multi.Components;
|
||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Multi.Components
|
namespace osu.Game.Screens.Multi.Lounge.Components
|
||||||
{
|
{
|
||||||
public class RoomInspector : Container
|
public class RoomInspector : Container
|
||||||
{
|
{
|
@ -11,12 +11,13 @@ using osu.Framework.Screens;
|
|||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
using osu.Game.Online.Multiplayer;
|
using osu.Game.Online.Multiplayer;
|
||||||
using osu.Game.Overlays.SearchableList;
|
using osu.Game.Overlays.SearchableList;
|
||||||
using osu.Game.Screens.Multi.Components;
|
using osu.Game.Screens.Multi.Lounge.Components;
|
||||||
|
using osu.Game.Screens.Multi.Match;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Multi.Screens.Lounge
|
namespace osu.Game.Screens.Multi.Lounge
|
||||||
{
|
{
|
||||||
public class Lounge : MultiplayerScreen
|
public class LoungeScreen : MultiplayerScreen
|
||||||
{
|
{
|
||||||
private readonly Container content;
|
private readonly Container content;
|
||||||
private readonly SearchContainer search;
|
private readonly SearchContainer search;
|
||||||
@ -32,7 +33,7 @@ namespace osu.Game.Screens.Multi.Screens.Lounge
|
|||||||
|
|
||||||
protected override Drawable TransitionContent => content;
|
protected override Drawable TransitionContent => content;
|
||||||
|
|
||||||
public Lounge()
|
public LoungeScreen()
|
||||||
{
|
{
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
@ -164,7 +165,7 @@ namespace osu.Game.Screens.Multi.Screens.Lounge
|
|||||||
|
|
||||||
Filter.Tabs.Current.Value = LoungeTab.Public;
|
Filter.Tabs.Current.Value = LoungeTab.Public;
|
||||||
|
|
||||||
Push(new Match.Match(roomBeingCreated));
|
Push(new MatchScreen(roomBeingCreated));
|
||||||
}
|
}
|
||||||
|
|
||||||
search.SearchTerm = Filter.Search.Current.Value ?? string.Empty;
|
search.SearchTerm = Filter.Search.Current.Value ?? string.Empty;
|
||||||
@ -194,7 +195,7 @@ namespace osu.Game.Screens.Multi.Screens.Lounge
|
|||||||
RoomsContainer.ForEach(c => c.State = c == room ? SelectionState.Selected : SelectionState.NotSelected);
|
RoomsContainer.ForEach(c => c.State = c == room ? SelectionState.Selected : SelectionState.NotSelected);
|
||||||
Inspector.Room = room.Room;
|
Inspector.Room = room.Room;
|
||||||
|
|
||||||
Push(new Match.Match(room.Room));
|
Push(new MatchScreen(room.Room));
|
||||||
}
|
}
|
||||||
|
|
||||||
private class RoomsFilterContainer : FillFlowContainer<DrawableRoom>, IHasFilterableChildren
|
private class RoomsFilterContainer : FillFlowContainer<DrawableRoom>, IHasFilterableChildren
|
@ -9,9 +9,10 @@ using osu.Framework.Graphics.UserInterface;
|
|||||||
using osu.Framework.Input.Events;
|
using osu.Framework.Input.Events;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Online.Multiplayer;
|
using osu.Game.Online.Multiplayer;
|
||||||
|
using osu.Game.Screens.Multi.Components;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Multi.Components
|
namespace osu.Game.Screens.Multi.Match.Components
|
||||||
{
|
{
|
||||||
public class GameTypePicker : DisableableTabControl<GameType>
|
public class GameTypePicker : DisableableTabControl<GameType>
|
||||||
{
|
{
|
@ -17,7 +17,7 @@ using osu.Game.Online.Multiplayer;
|
|||||||
using osu.Game.Overlays.SearchableList;
|
using osu.Game.Overlays.SearchableList;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Multi.Screens.Match
|
namespace osu.Game.Screens.Multi.Match.Components
|
||||||
{
|
{
|
||||||
public class Header : Container
|
public class Header : Container
|
||||||
{
|
{
|
@ -17,7 +17,7 @@ using osu.Game.Overlays.SearchableList;
|
|||||||
using osu.Game.Screens.Multi.Components;
|
using osu.Game.Screens.Multi.Components;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Multi.Screens.Match
|
namespace osu.Game.Screens.Multi.Match.Components
|
||||||
{
|
{
|
||||||
public class Info : Container
|
public class Info : Container
|
||||||
{
|
{
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
using osu.Framework.Configuration;
|
using osu.Framework.Configuration;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Multi.Screens.Match
|
namespace osu.Game.Screens.Multi.Match.Components
|
||||||
{
|
{
|
||||||
public abstract class MatchPage
|
public abstract class MatchPage
|
||||||
{
|
{
|
@ -10,7 +10,7 @@ using osu.Game.Graphics.UserInterface;
|
|||||||
using osu.Game.Online.Multiplayer;
|
using osu.Game.Online.Multiplayer;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Multi.Screens.Match
|
namespace osu.Game.Screens.Multi.Match.Components
|
||||||
{
|
{
|
||||||
public class MatchTabControl : PageTabControl<MatchPage>
|
public class MatchTabControl : PageTabControl<MatchPage>
|
||||||
{
|
{
|
@ -11,7 +11,7 @@ using osu.Game.Screens.Multi.Components;
|
|||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Multi.Screens.Match
|
namespace osu.Game.Screens.Multi.Match.Components
|
||||||
{
|
{
|
||||||
public class Participants : CompositeDrawable
|
public class Participants : CompositeDrawable
|
||||||
{
|
{
|
@ -10,10 +10,11 @@ using osu.Framework.Input.Events;
|
|||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
using osu.Game.Online.Multiplayer;
|
using osu.Game.Online.Multiplayer;
|
||||||
|
using osu.Game.Screens.Multi.Components;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Multi.Components
|
namespace osu.Game.Screens.Multi.Match.Components
|
||||||
{
|
{
|
||||||
public class RoomAvailabilityPicker : DisableableTabControl<RoomAvailability>
|
public class RoomAvailabilityPicker : DisableableTabControl<RoomAvailability>
|
||||||
{
|
{
|
@ -12,11 +12,10 @@ using osu.Game.Graphics.Sprites;
|
|||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
using osu.Game.Online.Multiplayer;
|
using osu.Game.Online.Multiplayer;
|
||||||
using osu.Game.Overlays.SearchableList;
|
using osu.Game.Overlays.SearchableList;
|
||||||
using osu.Game.Screens.Multi.Components;
|
|
||||||
using osuTK;
|
using osuTK;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Multi.Screens.Match
|
namespace osu.Game.Screens.Multi.Match.Components
|
||||||
{
|
{
|
||||||
public class RoomSettingsOverlay : FocusedOverlayContainer
|
public class RoomSettingsOverlay : FocusedOverlayContainer
|
||||||
{
|
{
|
@ -9,12 +9,13 @@ using osu.Framework.Graphics.Containers;
|
|||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Online.API;
|
using osu.Game.Online.API;
|
||||||
using osu.Game.Online.Multiplayer;
|
using osu.Game.Online.Multiplayer;
|
||||||
|
using osu.Game.Screens.Multi.Match.Components;
|
||||||
using osu.Game.Screens.Select;
|
using osu.Game.Screens.Select;
|
||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Multi.Screens.Match
|
namespace osu.Game.Screens.Multi.Match
|
||||||
{
|
{
|
||||||
public class Match : MultiplayerScreen
|
public class MatchScreen : MultiplayerScreen
|
||||||
{
|
{
|
||||||
private readonly Participants participants;
|
private readonly Participants participants;
|
||||||
|
|
||||||
@ -41,7 +42,7 @@ namespace osu.Game.Screens.Multi.Screens.Match
|
|||||||
[Resolved]
|
[Resolved]
|
||||||
private APIAccess api { get; set; }
|
private APIAccess api { get; set; }
|
||||||
|
|
||||||
public Match(Room room)
|
public MatchScreen(Room room)
|
||||||
{
|
{
|
||||||
this.room = room;
|
this.room = room;
|
||||||
|
|
||||||
@ -53,29 +54,29 @@ namespace osu.Game.Screens.Multi.Screens.Match
|
|||||||
participantsBind.BindTo(room.Participants);
|
participantsBind.BindTo(room.Participants);
|
||||||
maxParticipantsBind.BindTo(room.MaxParticipants);
|
maxParticipantsBind.BindTo(room.MaxParticipants);
|
||||||
|
|
||||||
Header header;
|
Components.Header header;
|
||||||
RoomSettingsOverlay settings;
|
RoomSettingsOverlay settings;
|
||||||
Info info;
|
Info info;
|
||||||
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
header = new Header
|
header = new Components.Header
|
||||||
{
|
{
|
||||||
Depth = -1,
|
Depth = -1,
|
||||||
},
|
},
|
||||||
info = new Info
|
info = new Info
|
||||||
{
|
{
|
||||||
Margin = new MarginPadding { Top = Header.HEIGHT },
|
Margin = new MarginPadding { Top = Components.Header.HEIGHT },
|
||||||
},
|
},
|
||||||
participants = new Participants
|
participants = new Participants
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Padding = new MarginPadding { Top = Header.HEIGHT + Info.HEIGHT },
|
Padding = new MarginPadding { Top = Components.Header.HEIGHT + Info.HEIGHT },
|
||||||
},
|
},
|
||||||
new Container
|
new Container
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Padding = new MarginPadding { Top = Header.HEIGHT },
|
Padding = new MarginPadding { Top = Components.Header.HEIGHT },
|
||||||
Child = settings = new RoomSettingsOverlay
|
Child = settings = new RoomSettingsOverlay
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
@ -9,7 +9,7 @@ using osu.Game.Graphics;
|
|||||||
using osu.Game.Graphics.Backgrounds;
|
using osu.Game.Graphics.Backgrounds;
|
||||||
using osu.Game.Graphics.Containers;
|
using osu.Game.Graphics.Containers;
|
||||||
using osu.Game.Screens.Menu;
|
using osu.Game.Screens.Menu;
|
||||||
using osu.Game.Screens.Multi.Screens.Lounge;
|
using osu.Game.Screens.Multi.Lounge;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Multi
|
namespace osu.Game.Screens.Multi
|
||||||
{
|
{
|
||||||
@ -26,7 +26,7 @@ namespace osu.Game.Screens.Multi
|
|||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
};
|
};
|
||||||
|
|
||||||
Lounge lounge;
|
LoungeScreen loungeScreen;
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new Container
|
new Container
|
||||||
@ -53,12 +53,12 @@ namespace osu.Game.Screens.Multi
|
|||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Padding = new MarginPadding { Top = Header.HEIGHT },
|
Padding = new MarginPadding { Top = Header.HEIGHT },
|
||||||
Child = lounge = new Lounge(),
|
Child = loungeScreen = new LoungeScreen(),
|
||||||
},
|
},
|
||||||
new Header(lounge),
|
new Header(loungeScreen),
|
||||||
};
|
};
|
||||||
|
|
||||||
lounge.Exited += s => Exit();
|
loungeScreen.Exited += s => Exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnEntering(Screen last)
|
protected override void OnEntering(Screen last)
|
||||||
|
@ -5,7 +5,7 @@ using osu.Framework.Graphics;
|
|||||||
using osu.Framework.Screens;
|
using osu.Framework.Screens;
|
||||||
using osu.Game.Graphics.Containers;
|
using osu.Game.Graphics.Containers;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Multi.Screens
|
namespace osu.Game.Screens.Multi
|
||||||
{
|
{
|
||||||
public abstract class MultiplayerScreen : OsuScreen, IMultiplayerScreen
|
public abstract class MultiplayerScreen : OsuScreen, IMultiplayerScreen
|
||||||
{
|
{
|
@ -1,7 +1,7 @@
|
|||||||
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using osu.Game.Screens.Multi.Screens;
|
using osu.Game.Screens.Multi;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Select
|
namespace osu.Game.Screens.Select
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user