1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 17:02:55 +08:00

Remove participants from playlists screen

This commit is contained in:
smoogipoo 2021-08-18 16:26:45 +09:00
parent 66e11fe75e
commit 87a5922f0e

View File

@ -36,7 +36,6 @@ namespace osu.Game.Screens.OnlinePlay.Playlists
private readonly IBindable<bool> isIdle = new BindableBool(); private readonly IBindable<bool> isIdle = new BindableBool();
private MatchLeaderboard leaderboard; private MatchLeaderboard leaderboard;
private OverlinedHeader participantsHeader;
private SelectionPollingComponent selectionPollingComponent; private SelectionPollingComponent selectionPollingComponent;
public PlaylistsRoomSubScreen(Room room) public PlaylistsRoomSubScreen(Room room)
@ -85,150 +84,110 @@ namespace osu.Game.Screens.OnlinePlay.Playlists
protected override Drawable CreateMainContent() => new GridContainer protected override Drawable CreateMainContent() => new GridContainer
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
RowDimensions = new[]
{
new Dimension(GridSizeMode.AutoSize),
new Dimension(GridSizeMode.AutoSize),
new Dimension(GridSizeMode.AutoSize),
new Dimension(),
},
Content = new[] Content = new[]
{ {
new Drawable[] { new Match.Components.Header() },
new Drawable[]
{
participantsHeader = new OverlinedHeader("Participants")
{
ShowLine = false
}
},
new Drawable[] new Drawable[]
{ {
new Container new Container
{ {
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.Both,
AutoSizeAxes = Axes.Y, Padding = new MarginPadding { Right = 5 },
Margin = new MarginPadding { Top = 5 }, Child = new GridContainer
Child = new ParticipantsDisplay(Direction.Horizontal)
{ {
Details = { BindTarget = participantsHeader.Details } RelativeSizeAxes = Axes.Both,
Content = new[]
{
new Drawable[] { new OverlinedPlaylistHeader(), },
new Drawable[]
{
new DrawableRoomPlaylistWithResults
{
RelativeSizeAxes = Axes.Both,
Items = { BindTarget = Room.Playlist },
SelectedItem = { BindTarget = SelectedItem },
RequestShowResults = item =>
{
Debug.Assert(RoomId.Value != null);
ParentScreen?.Push(new PlaylistsResultsScreen(null, RoomId.Value.Value, item, false));
}
}
},
},
RowDimensions = new[]
{
new Dimension(GridSizeMode.AutoSize),
new Dimension(),
}
} }
} },
}, null,
new Drawable[]
{
new GridContainer new GridContainer
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Content = new[] Content = new[]
{ {
new Drawable[] new[]
{ {
new Container UserModsSection = new FillFlowContainer
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.X,
Padding = new MarginPadding { Right = 5 }, AutoSizeAxes = Axes.Y,
Child = new GridContainer Margin = new MarginPadding { Bottom = 10 },
Children = new Drawable[]
{ {
RelativeSizeAxes = Axes.Both, new OverlinedHeader("Extra mods"),
Content = new[] new FillFlowContainer
{ {
new Drawable[] { new OverlinedPlaylistHeader(), }, AutoSizeAxes = Axes.Both,
new Drawable[] Direction = FillDirection.Horizontal,
Spacing = new Vector2(10, 0),
Children = new Drawable[]
{ {
new DrawableRoomPlaylistWithResults new UserModSelectButton
{ {
RelativeSizeAxes = Axes.Both, Anchor = Anchor.CentreLeft,
Items = { BindTarget = Room.Playlist }, Origin = Anchor.CentreLeft,
SelectedItem = { BindTarget = SelectedItem }, Width = 90,
RequestShowResults = item => Text = "Select",
{ Action = ShowUserModSelect,
Debug.Assert(RoomId.Value != null); },
ParentScreen?.Push(new PlaylistsResultsScreen(null, RoomId.Value.Value, item, false)); new ModDisplay
} {
} Anchor = Anchor.CentreLeft,
}, Origin = Anchor.CentreLeft,
}, Current = UserMods,
RowDimensions = new[] Scale = new Vector2(0.8f),
{ },
new Dimension(GridSizeMode.AutoSize), }
new Dimension(),
} }
} }
}, },
null,
new GridContainer
{
RelativeSizeAxes = Axes.Both,
Content = new[]
{
new[]
{
UserModsSection = new FillFlowContainer
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Margin = new MarginPadding { Bottom = 10 },
Children = new Drawable[]
{
new OverlinedHeader("Extra mods"),
new FillFlowContainer
{
AutoSizeAxes = Axes.Both,
Direction = FillDirection.Horizontal,
Spacing = new Vector2(10, 0),
Children = new Drawable[]
{
new UserModSelectButton
{
Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft,
Width = 90,
Text = "Select",
Action = ShowUserModSelect,
},
new ModDisplay
{
Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft,
Current = UserMods,
Scale = new Vector2(0.8f),
},
}
}
}
},
},
new Drawable[]
{
new OverlinedHeader("Leaderboard")
},
new Drawable[] { leaderboard = new MatchLeaderboard { RelativeSizeAxes = Axes.Both }, },
new Drawable[] { new OverlinedHeader("Chat"), },
new Drawable[] { new MatchChatDisplay { RelativeSizeAxes = Axes.Both } }
},
RowDimensions = new[]
{
new Dimension(GridSizeMode.AutoSize),
new Dimension(GridSizeMode.AutoSize),
new Dimension(),
new Dimension(GridSizeMode.AutoSize),
new Dimension(GridSizeMode.Relative, size: 0.4f, minSize: 120),
}
},
null
}, },
new Drawable[]
{
new OverlinedHeader("Leaderboard")
},
new Drawable[] { leaderboard = new MatchLeaderboard { RelativeSizeAxes = Axes.Both }, },
new Drawable[] { new OverlinedHeader("Chat"), },
new Drawable[] { new MatchChatDisplay { RelativeSizeAxes = Axes.Both } }
}, },
ColumnDimensions = new[] RowDimensions = new[]
{ {
new Dimension(GridSizeMode.Relative, size: 0.5f, maxSize: 400), new Dimension(GridSizeMode.AutoSize),
new Dimension(), new Dimension(GridSizeMode.AutoSize),
new Dimension(GridSizeMode.Relative, size: 0.5f, maxSize: 600),
new Dimension(), new Dimension(),
new Dimension(GridSizeMode.AutoSize),
new Dimension(GridSizeMode.Relative, size: 0.4f, minSize: 120),
} }
} },
} },
}, },
ColumnDimensions = new[]
{
new Dimension(GridSizeMode.Relative, size: 0.5f, maxSize: 400),
new Dimension(),
new Dimension(GridSizeMode.Relative, size: 0.5f, maxSize: 600),
}
}; };
protected override Drawable CreateFooter() => new Footer protected override Drawable CreateFooter() => new Footer