Remove nesting of components inside overlined component

I think this makes things a bit more readable. The only weird case is
the transfer of details from the component to the `OverlinedHeader`, but
bindables make it not too bad.
This commit is contained in:
Dean Herbert
2020-07-07 19:23:11 +09:00
parent 2afc436a30
commit 35d3292200
11 changed files with 151 additions and 255 deletions

View File

@ -24,6 +24,8 @@ namespace osu.Game.Screens.Multi.Lounge.Components
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
OverlinedHeader participantsHeader;
InternalChildren = new Drawable[]
{
new Box
@ -55,22 +57,31 @@ namespace osu.Game.Screens.Multi.Lounge.Components
RelativeSizeAxes = Axes.X,
Margin = new MarginPadding { Vertical = 60 },
},
new OverlinedParticipants(Direction.Horizontal)
participantsHeader = new OverlinedHeader("Recent Participants"),
new ParticipantsDisplay(Direction.Vertical)
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y
},
Height = ParticipantsList.TILE_SIZE * 3,
Details = { BindTarget = participantsHeader.Details }
}
}
}
},
new Drawable[] { new OverlinedHeader("Playlist"), },
new Drawable[]
{
new OverlinedPlaylist(false) { RelativeSizeAxes = Axes.Both },
new DrawableRoomPlaylist(false, false)
{
RelativeSizeAxes = Axes.Both,
Items = { BindTarget = Playlist }
},
},
},
RowDimensions = new[]
{
new Dimension(GridSizeMode.AutoSize),
new Dimension(GridSizeMode.AutoSize),
new Dimension(),
}
}
}