2019-01-24 08:43:03 +00:00
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
|
|
using osu.Framework.Allocation;
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
using osu.Framework.Graphics.Containers;
|
|
|
|
using osu.Framework.Graphics.Shapes;
|
|
|
|
using osu.Game.Beatmaps;
|
|
|
|
using osu.Game.Graphics;
|
2020-12-25 15:50:00 +00:00
|
|
|
using osu.Game.Screens.OnlinePlay.Components;
|
2018-11-20 07:51:59 +00:00
|
|
|
using osuTK.Graphics;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
2020-12-25 15:50:00 +00:00
|
|
|
namespace osu.Game.Screens.OnlinePlay.Lounge.Components
|
2018-04-13 09:19:50 +00:00
|
|
|
{
|
2019-02-05 10:00:01 +00:00
|
|
|
public class RoomInspector : MultiplayerComposite
|
2018-04-13 09:19:50 +00:00
|
|
|
{
|
|
|
|
private const float transition_duration = 100;
|
|
|
|
|
2018-05-19 05:23:09 +00:00
|
|
|
private readonly MarginPadding contentPadding = new MarginPadding { Horizontal = 20, Vertical = 10 };
|
2018-04-13 09:19:50 +00:00
|
|
|
|
2018-12-06 03:21:30 +00:00
|
|
|
[Resolved]
|
|
|
|
private BeatmapManager beatmaps { get; set; }
|
|
|
|
|
2018-05-19 04:26:39 +00:00
|
|
|
[BackgroundDependencyLoader]
|
2018-05-29 02:33:13 +00:00
|
|
|
private void load(OsuColour colours)
|
2018-05-19 04:26:39 +00:00
|
|
|
{
|
2020-07-07 10:23:11 +00:00
|
|
|
OverlinedHeader participantsHeader;
|
|
|
|
|
2019-02-05 10:00:01 +00:00
|
|
|
InternalChildren = new Drawable[]
|
2018-04-13 09:19:50 +00:00
|
|
|
{
|
|
|
|
new Box
|
|
|
|
{
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
2020-02-19 08:47:59 +00:00
|
|
|
Colour = Color4.Black,
|
|
|
|
Alpha = 0.25f
|
2018-04-13 09:19:50 +00:00
|
|
|
},
|
2020-02-19 08:47:59 +00:00
|
|
|
new Container
|
2018-04-13 09:19:50 +00:00
|
|
|
{
|
2019-01-09 06:15:54 +00:00
|
|
|
RelativeSizeAxes = Axes.Both,
|
2020-02-19 08:47:59 +00:00
|
|
|
Padding = new MarginPadding { Horizontal = 30 },
|
|
|
|
Child = new GridContainer
|
2018-04-13 09:19:50 +00:00
|
|
|
{
|
2020-02-19 08:47:59 +00:00
|
|
|
RelativeSizeAxes = Axes.Both,
|
|
|
|
Content = new[]
|
2018-04-13 09:19:50 +00:00
|
|
|
{
|
2020-02-19 08:47:59 +00:00
|
|
|
new Drawable[]
|
2018-04-13 09:19:50 +00:00
|
|
|
{
|
2020-02-19 08:47:59 +00:00
|
|
|
new FillFlowContainer
|
2018-04-13 09:19:50 +00:00
|
|
|
{
|
2020-02-19 08:47:59 +00:00
|
|
|
RelativeSizeAxes = Axes.X,
|
|
|
|
AutoSizeAxes = Axes.Y,
|
|
|
|
Direction = FillDirection.Vertical,
|
|
|
|
Children = new Drawable[]
|
2018-04-13 09:19:50 +00:00
|
|
|
{
|
2020-02-19 08:47:59 +00:00
|
|
|
new RoomInfo
|
2018-04-13 09:19:50 +00:00
|
|
|
{
|
2020-02-19 08:47:59 +00:00
|
|
|
RelativeSizeAxes = Axes.X,
|
|
|
|
Margin = new MarginPadding { Vertical = 60 },
|
2018-04-13 09:19:50 +00:00
|
|
|
},
|
2020-07-07 10:23:11 +00:00
|
|
|
participantsHeader = new OverlinedHeader("Recent Participants"),
|
|
|
|
new ParticipantsDisplay(Direction.Vertical)
|
2018-04-13 09:19:50 +00:00
|
|
|
{
|
2020-02-19 08:47:59 +00:00
|
|
|
RelativeSizeAxes = Axes.X,
|
2020-07-07 10:23:11 +00:00
|
|
|
Height = ParticipantsList.TILE_SIZE * 3,
|
|
|
|
Details = { BindTarget = participantsHeader.Details }
|
|
|
|
}
|
2020-02-19 08:47:59 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2020-12-03 08:59:39 +00:00
|
|
|
new Drawable[] { new OverlinedPlaylistHeader(), },
|
2020-02-19 08:47:59 +00:00
|
|
|
new Drawable[]
|
|
|
|
{
|
2020-07-07 10:23:11 +00:00
|
|
|
new DrawableRoomPlaylist(false, false)
|
|
|
|
{
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
|
|
|
Items = { BindTarget = Playlist }
|
|
|
|
},
|
2018-04-13 09:19:50 +00:00
|
|
|
},
|
|
|
|
},
|
2020-02-19 08:47:59 +00:00
|
|
|
RowDimensions = new[]
|
2018-04-13 09:19:50 +00:00
|
|
|
{
|
2020-02-19 08:47:59 +00:00
|
|
|
new Dimension(GridSizeMode.AutoSize),
|
2020-07-07 10:23:11 +00:00
|
|
|
new Dimension(GridSizeMode.AutoSize),
|
|
|
|
new Dimension(),
|
2019-01-09 06:15:54 +00:00
|
|
|
}
|
|
|
|
}
|
2019-01-08 10:24:55 +00:00
|
|
|
}
|
2018-04-13 09:19:50 +00:00
|
|
|
};
|
2019-02-07 08:59:14 +00:00
|
|
|
}
|
2018-04-13 09:19:50 +00:00
|
|
|
}
|
|
|
|
}
|