Add recent participants

This commit is contained in:
smoogipoo
2020-06-25 20:53:48 +09:00
parent 54f087b933
commit 01fa664b7d
3 changed files with 50 additions and 26 deletions

View File

@ -66,6 +66,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
Room.RoomID.Value = 1; Room.RoomID.Value = 1;
Room.Name.Value = "my awesome room"; Room.Name.Value = "my awesome room";
Room.Host.Value = new User { Id = 2, Username = "peppy" }; Room.Host.Value = new User { Id = 2, Username = "peppy" };
Room.RecentParticipants.Add(Room.Host.Value);
Room.Playlist.Add(new PlaylistItem Room.Playlist.Add(new PlaylistItem
{ {
Beatmap = { Value = new TestBeatmap(new OsuRuleset().RulesetInfo).BeatmapInfo }, Beatmap = { Value = new TestBeatmap(new OsuRuleset().RulesetInfo).BeatmapInfo },

View File

@ -35,6 +35,18 @@ namespace osu.Game.Screens.Multi.Components
} }
} }
private bool showLine = true;
public bool ShowLine
{
get => showLine;
set
{
showLine = value;
line.Alpha = value ? 1 : 0;
}
}
protected string Details protected string Details
{ {
set => details.Text = value; set => details.Text = value;

View File

@ -94,9 +94,20 @@ namespace osu.Game.Screens.Multi.Match
{ {
new Container new Container
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.X,
Padding = new MarginPadding { Top = 65 }, AutoSizeAxes = Axes.Y,
Child = new GridContainer Margin = new MarginPadding { Top = 10 },
Child = new OverlinedParticipants(Direction.Horizontal)
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
ShowLine = false
}
}
},
new Drawable[]
{
new GridContainer
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Content = new[] Content = new[]
@ -129,10 +140,10 @@ namespace osu.Game.Screens.Multi.Match
} }
} }
} }
}
}, },
RowDimensions = new[] RowDimensions = new[]
{ {
new Dimension(GridSizeMode.AutoSize),
new Dimension(GridSizeMode.AutoSize), new Dimension(GridSizeMode.AutoSize),
new Dimension(), new Dimension(),
} }