2020-02-14 19:42:14 +08: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.
|
|
|
|
|
|
|
|
using osu.Framework.Allocation;
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
2020-02-19 16:33:09 +08:00
|
|
|
namespace osu.Game.Screens.Multi.Components
|
2020-02-14 19:42:14 +08:00
|
|
|
{
|
|
|
|
public class OverlinedParticipants : OverlinedDisplay
|
|
|
|
{
|
|
|
|
public OverlinedParticipants()
|
|
|
|
: base("Participants")
|
|
|
|
{
|
|
|
|
Content.Add(new ParticipantsList { RelativeSizeAxes = Axes.Both });
|
|
|
|
}
|
|
|
|
|
|
|
|
[BackgroundDependencyLoader]
|
|
|
|
private void load()
|
|
|
|
{
|
|
|
|
ParticipantCount.BindValueChanged(_ => setParticipantCount());
|
|
|
|
MaxParticipants.BindValueChanged(_ => setParticipantCount());
|
|
|
|
|
|
|
|
setParticipantCount();
|
|
|
|
}
|
|
|
|
|
|
|
|
private void setParticipantCount() => Details = MaxParticipants.Value != null ? $"{ParticipantCount.Value}/{MaxParticipants.Value}" : ParticipantCount.Value.ToString();
|
|
|
|
}
|
|
|
|
}
|