1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-14 00:53:19 +08:00

Add settings to lounge

This commit is contained in:
smoogipoo 2018-12-03 18:30:26 +09:00
parent 53a54f8634
commit 6a28e8c696
2 changed files with 20 additions and 5 deletions

View File

@ -10,11 +10,11 @@ namespace osu.Game.Online.Multiplayer
{ {
public class Room public class Room
{ {
public Bindable<string> Name = new Bindable<string>(); public Bindable<string> Name = new Bindable<string>("My awesome room!");
public Bindable<User> Host = new Bindable<User>(); public Bindable<User> Host = new Bindable<User>();
public Bindable<RoomStatus> Status = new Bindable<RoomStatus>(); public Bindable<RoomStatus> Status = new Bindable<RoomStatus>(new RoomStatusOpen());
public Bindable<RoomAvailability> Availability = new Bindable<RoomAvailability>(); public Bindable<RoomAvailability> Availability = new Bindable<RoomAvailability>();
public Bindable<GameType> Type = new Bindable<GameType>(); public Bindable<GameType> Type = new Bindable<GameType>(new GameTypeVersus());
public Bindable<BeatmapInfo> Beatmap = new Bindable<BeatmapInfo>(); public Bindable<BeatmapInfo> Beatmap = new Bindable<BeatmapInfo>();
public Bindable<int?> MaxParticipants = new Bindable<int?>(); public Bindable<int?> MaxParticipants = new Bindable<int?>();
public Bindable<IEnumerable<User>> Participants = new Bindable<IEnumerable<User>>(); public Bindable<IEnumerable<User>> Participants = new Bindable<IEnumerable<User>>();

View File

@ -20,6 +20,7 @@ namespace osu.Game.Screens.Multi.Screens.Lounge
{ {
private readonly Container content; private readonly Container content;
private readonly SearchContainer search; private readonly SearchContainer search;
private readonly RoomSettingsOverlay settings;
protected readonly FilterControl Filter; protected readonly FilterControl Filter;
protected readonly FillFlowContainer<DrawableRoom> RoomsContainer; protected readonly FillFlowContainer<DrawableRoom> RoomsContainer;
@ -56,7 +57,7 @@ namespace osu.Game.Screens.Multi.Screens.Lounge
{ {
Children = new Drawable[] Children = new Drawable[]
{ {
Filter = new FilterControl(), Filter = new FilterControl { Depth = -1 },
content = new Container content = new Container
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
@ -91,8 +92,17 @@ namespace osu.Game.Screens.Multi.Screens.Lounge
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Width = 0.45f, Width = 0.45f,
}, },
new Container
{
RelativeSizeAxes = Axes.Both,
Child = settings = new RoomSettingsOverlay(new Room())
{
RelativeSizeAxes = Axes.Both,
Height = 0.9f,
},
},
}, },
}, }
}; };
Filter.Search.Current.ValueChanged += s => filterRooms(); Filter.Search.Current.ValueChanged += s => filterRooms();
@ -143,6 +153,11 @@ namespace osu.Game.Screens.Multi.Screens.Lounge
private void filterRooms() private void filterRooms()
{ {
if (Filter.Tabs.Current.Value == LoungeTab.Create)
settings.Show();
else
settings.Hide();
search.SearchTerm = Filter.Search.Current.Value ?? string.Empty; search.SearchTerm = Filter.Search.Current.Value ?? string.Empty;
foreach (DrawableRoom r in RoomsContainer.Children) foreach (DrawableRoom r in RoomsContainer.Children)