1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 01:02:55 +08:00

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.Name.Value = "my awesome room";
Room.Host.Value = new User { Id = 2, Username = "peppy" };
Room.RecentParticipants.Add(Room.Host.Value);
Room.Playlist.Add(new PlaylistItem
{
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
{
set => details.Text = value;

View File

@ -94,45 +94,56 @@ namespace osu.Game.Screens.Multi.Match
{
new Container
{
RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding { Top = 65 },
Child = new GridContainer
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Margin = new MarginPadding { Top = 10 },
Child = new OverlinedParticipants(Direction.Horizontal)
{
RelativeSizeAxes = Axes.Both,
Content = new[]
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
ShowLine = false
}
}
},
new Drawable[]
{
new GridContainer
{
RelativeSizeAxes = Axes.Both,
Content = new[]
{
new Drawable[]
{
new Drawable[]
new Container
{
new Container
RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding { Right = 5 },
Child = new OverlinedPlaylist(true) // Temporarily always allow selection
{
RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding { Right = 5 },
Child = new OverlinedPlaylist(true) // Temporarily always allow selection
{
RelativeSizeAxes = Axes.Both,
SelectedItem = { BindTarget = SelectedItem }
}
},
new Container
{
RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding { Horizontal = 5 },
Child = leaderboard = new OverlinedLeaderboard { RelativeSizeAxes = Axes.Both },
},
new Container
{
RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding { Left = 5 },
Child = new OverlinedChatDisplay { RelativeSizeAxes = Axes.Both }
SelectedItem = { BindTarget = SelectedItem }
}
},
}
new Container
{
RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding { Horizontal = 5 },
Child = leaderboard = new OverlinedLeaderboard { RelativeSizeAxes = Axes.Both },
},
new Container
{
RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding { Left = 5 },
Child = new OverlinedChatDisplay { RelativeSizeAxes = Axes.Both }
}
},
}
}
}
},
RowDimensions = new[]
{
new Dimension(GridSizeMode.AutoSize),
new Dimension(GridSizeMode.AutoSize),
new Dimension(),
}