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

Use explicit label

This commit is contained in:
Dean Herbert 2021-04-19 15:27:38 +09:00
parent a10a8680d0
commit d3cebfb6fb
2 changed files with 6 additions and 4 deletions

View File

@ -16,12 +16,14 @@ namespace osu.Game.Screens.Edit.Timing
public class RowAttribute : CompositeDrawable
{
private readonly ControlPoint point;
private readonly string label;
protected FillFlowContainer Content { get; private set; }
public RowAttribute(ControlPoint point)
public RowAttribute(ControlPoint point, string label)
{
this.point = point;
this.label = label;
}
[BackgroundDependencyLoader]
@ -72,7 +74,7 @@ namespace osu.Game.Screens.Edit.Timing
Origin = Anchor.CentreLeft,
Padding = new MarginPadding(3),
Font = OsuFont.Default.With(weight: FontWeight.SemiBold, size: 12),
Text = point.GetType().Name.Replace("ControlPoint", string.Empty).ToLowerInvariant(),
Text = label,
Colour = colours.Gray0
},
},

View File

@ -12,14 +12,14 @@ using osu.Game.Graphics.Sprites;
namespace osu.Game.Screens.Edit.Timing.RowAttributes
{
internal class TimingRowAttribute : RowAttribute
public class TimingRowAttribute : RowAttribute
{
private readonly BindableNumber<double> beatLength;
private readonly Bindable<TimeSignatures> timeSignature;
private OsuSpriteText text;
public TimingRowAttribute(TimingControlPoint timing)
: base(timing)
: base(timing, "timing")
{
timeSignature = timing.TimeSignatureBindable.GetBoundCopy();
beatLength = timing.BeatLengthBindable.GetBoundCopy();