1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-23 12:07:25 +08:00
osu-lazer/osu.Game/Screens/Multi/Lounge/Components/RoomInspector.cs

92 lines
3.6 KiB
C#
Raw Normal View History

// 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 17:19:50 +08: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;
2018-12-10 18:20:41 +08:00
using osu.Game.Screens.Multi.Components;
2018-11-20 15:51:59 +08:00
using osuTK.Graphics;
2018-04-13 17:19:50 +08:00
2018-12-10 18:20:41 +08:00
namespace osu.Game.Screens.Multi.Lounge.Components
2018-04-13 17:19:50 +08:00
{
2019-02-05 18:00:01 +08:00
public class RoomInspector : MultiplayerComposite
2018-04-13 17:19:50 +08:00
{
private const float transition_duration = 100;
private readonly MarginPadding contentPadding = new MarginPadding { Horizontal = 20, Vertical = 10 };
2018-04-13 17:19:50 +08:00
2018-12-06 11:21:30 +08:00
[Resolved]
private BeatmapManager beatmaps { get; set; }
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
OverlinedHeader participantsHeader;
2019-02-05 18:00:01 +08:00
InternalChildren = new Drawable[]
2018-04-13 17:19:50 +08:00
{
new Box
{
RelativeSizeAxes = Axes.Both,
2020-02-19 16:47:59 +08:00
Colour = Color4.Black,
Alpha = 0.25f
2018-04-13 17:19:50 +08:00
},
2020-02-19 16:47:59 +08:00
new Container
2018-04-13 17:19:50 +08:00
{
RelativeSizeAxes = Axes.Both,
2020-02-19 16:47:59 +08:00
Padding = new MarginPadding { Horizontal = 30 },
Child = new GridContainer
2018-04-13 17:19:50 +08:00
{
2020-02-19 16:47:59 +08:00
RelativeSizeAxes = Axes.Both,
Content = new[]
2018-04-13 17:19:50 +08:00
{
2020-02-19 16:47:59 +08:00
new Drawable[]
2018-04-13 17:19:50 +08:00
{
2020-02-19 16:47:59 +08:00
new FillFlowContainer
2018-04-13 17:19:50 +08:00
{
2020-02-19 16:47:59 +08:00
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Direction = FillDirection.Vertical,
Children = new Drawable[]
2018-04-13 17:19:50 +08:00
{
2020-02-19 16:47:59 +08:00
new RoomInfo
2018-04-13 17:19:50 +08:00
{
2020-02-19 16:47:59 +08:00
RelativeSizeAxes = Axes.X,
Margin = new MarginPadding { Vertical = 60 },
2018-04-13 17:19:50 +08:00
},
participantsHeader = new OverlinedHeader("Recent Participants"),
new ParticipantsDisplay(Direction.Vertical)
2018-04-13 17:19:50 +08:00
{
2020-02-19 16:47:59 +08:00
RelativeSizeAxes = Axes.X,
Height = ParticipantsList.TILE_SIZE * 3,
Details = { BindTarget = participantsHeader.Details }
}
2020-02-19 16:47:59 +08:00
}
}
},
new Drawable[] { new OverlinedHeader("Playlist"), },
2020-02-19 16:47:59 +08:00
new Drawable[]
{
new DrawableRoomPlaylist(false, false)
{
RelativeSizeAxes = Axes.Both,
Items = { BindTarget = Playlist }
},
2018-04-13 17:19:50 +08:00
},
},
2020-02-19 16:47:59 +08:00
RowDimensions = new[]
2018-04-13 17:19:50 +08:00
{
2020-02-19 16:47:59 +08:00
new Dimension(GridSizeMode.AutoSize),
new Dimension(GridSizeMode.AutoSize),
new Dimension(),
}
}
}
2018-04-13 17:19:50 +08:00
};
2019-02-07 16:59:14 +08:00
}
2018-04-13 17:19:50 +08:00
}
}