mirror of
https://github.com/ppy/osu.git
synced 2024-12-27 15:32:57 +08:00
35 lines
990 B
C#
35 lines
990 B
C#
// 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.
|
|
|
|
#nullable disable
|
|
|
|
using osu.Framework.Allocation;
|
|
using osu.Framework.Graphics;
|
|
using osu.Game.Beatmaps.ControlPoints;
|
|
using osu.Game.Graphics;
|
|
using osu.Game.Graphics.Sprites;
|
|
|
|
namespace osu.Game.Screens.Edit.Timing.RowAttributes
|
|
{
|
|
public class AttributeText : OsuSpriteText
|
|
{
|
|
private readonly ControlPoint controlPoint;
|
|
|
|
public AttributeText(ControlPoint controlPoint)
|
|
{
|
|
this.controlPoint = controlPoint;
|
|
}
|
|
|
|
[BackgroundDependencyLoader]
|
|
private void load(OsuColour colours)
|
|
{
|
|
Anchor = Anchor.CentreLeft;
|
|
Origin = Anchor.CentreLeft;
|
|
|
|
Padding = new MarginPadding(6);
|
|
Font = OsuFont.Default.With(weight: FontWeight.Bold, size: 12);
|
|
Colour = controlPoint.GetRepresentingColour(colours);
|
|
}
|
|
}
|
|
}
|