mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Move overlined displays to a higher namespace
This commit is contained in:
28
osu.Game/Screens/Multi/Components/OverlinedParticipants.cs
Normal file
28
osu.Game/Screens/Multi/Components/OverlinedParticipants.cs
Normal file
@ -0,0 +1,28 @@
|
||||
// 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;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Components
|
||||
{
|
||||
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();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user