Allow different sizing modes for OverlinedParticipants

This commit is contained in:
smoogipoo
2020-02-19 17:37:01 +09:00
parent 380d200b46
commit ec73e8f0c7
6 changed files with 110 additions and 25 deletions

View File

@ -8,7 +8,6 @@ using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers;
using osu.Game.Online.API;
using osu.Game.Online.API.Requests;
using osu.Game.Users;
@ -19,21 +18,39 @@ namespace osu.Game.Screens.Multi.Components
{
public class ParticipantsList : MultiplayerComposite
{
public const float TILE_SIZE = 70;
public override Axes RelativeSizeAxes
{
get => base.RelativeSizeAxes;
set
{
base.RelativeSizeAxes = value;
fill.RelativeSizeAxes = value;
}
}
public new Axes AutoSizeAxes
{
get => base.AutoSizeAxes;
set
{
base.AutoSizeAxes = value;
fill.AutoSizeAxes = value;
}
}
public FillDirection Direction
{
get => fill.Direction;
set => fill.Direction = value;
}
private readonly FillFlowContainer fill;
public ParticipantsList()
{
InternalChild = new OsuScrollContainer
{
RelativeSizeAxes = Axes.Both,
Child = fill = new FillFlowContainer
{
Spacing = new Vector2(10),
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Direction = FillDirection.Full,
}
};
InternalChild = fill = new FillFlowContainer { Spacing = new Vector2(10) };
}
[BackgroundDependencyLoader]