1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-16 06:27:27 +08:00
osu-lazer/osu.Game/Screens/OnlinePlay/Lounge/Components/OnlinePlayPill.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

38 lines
1.2 KiB
C#
Raw Normal View History

2023-05-16 15:52:26 +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;
using osu.Framework.Graphics.Sprites;
2023-05-16 15:52:26 +08:00
using osu.Game.Graphics;
using osu.Game.Graphics.Containers;
namespace osu.Game.Screens.OnlinePlay.Lounge.Components
{
2023-05-17 15:13:03 +08:00
public abstract partial class OnlinePlayPill : OnlinePlayComposite
2023-05-16 15:52:26 +08:00
{
protected PillContainer Pill { get; private set; } = null!;
protected OsuTextFlowContainer TextFlow { get; private set; } = null!;
protected virtual FontUsage Font => OsuFont.GetFont(size: 12);
2023-05-16 15:52:26 +08:00
2023-05-17 15:13:03 +08:00
protected OnlinePlayPill()
2023-05-16 15:52:26 +08:00
{
AutoSizeAxes = Axes.Both;
}
[BackgroundDependencyLoader]
private void load()
{
2023-05-16 16:06:48 +08:00
InternalChild = Pill = new PillContainer
2023-05-16 15:52:26 +08:00
{
Child = TextFlow = new OsuTextFlowContainer(s => s.Font = Font)
2023-05-16 15:52:26 +08:00
{
AutoSizeAxes = Axes.Both,
Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft
}
};
}
}
}