1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 00:47:24 +08:00

Remove dead row attribute classes

These aren't shown on the control point table since difficulty and
sample control points were moved into objects.
This commit is contained in:
Bartłomiej Dach 2024-08-20 09:53:40 +02:00
parent 24a0a3c47f
commit 373ff47a94
No known key found for this signature in database
3 changed files with 0 additions and 107 deletions

View File

@ -323,14 +323,8 @@ namespace osu.Game.Screens.Edit.Timing
case TimingControlPoint timing:
return new TimingRowAttribute(timing);
case DifficultyControlPoint difficulty:
return new DifficultyRowAttribute(difficulty);
case EffectControlPoint effect:
return new EffectRowAttribute(effect);
case SampleControlPoint sample:
return new SampleRowAttribute(sample);
}
throw new ArgumentOutOfRangeException(nameof(controlPoint), $"Control point type {controlPoint.GetType()} is not supported");

View File

@ -1,44 +0,0 @@
// 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.Bindables;
using osu.Framework.Graphics;
using osu.Game.Beatmaps.ControlPoints;
using osu.Game.Graphics.Sprites;
namespace osu.Game.Screens.Edit.Timing.RowAttributes
{
public partial class DifficultyRowAttribute : RowAttribute
{
private readonly BindableNumber<double> speedMultiplier;
private OsuSpriteText text = null!;
public DifficultyRowAttribute(DifficultyControlPoint difficulty)
: base(difficulty, "difficulty")
{
speedMultiplier = difficulty.SliderVelocityBindable.GetBoundCopy();
}
[BackgroundDependencyLoader]
private void load()
{
Content.AddRange(new Drawable[]
{
new AttributeProgressBar(Point)
{
Current = speedMultiplier,
},
text = new AttributeText(Point)
{
Width = 45,
},
});
speedMultiplier.BindValueChanged(_ => updateText(), true);
}
private void updateText() => text.Text = $"{speedMultiplier.Value:n2}x";
}
}

View File

@ -1,57 +0,0 @@
// 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.Bindables;
using osu.Framework.Graphics;
using osu.Game.Beatmaps.ControlPoints;
using osu.Game.Graphics.Sprites;
namespace osu.Game.Screens.Edit.Timing.RowAttributes
{
public partial class SampleRowAttribute : RowAttribute
{
private AttributeText sampleText = null!;
private OsuSpriteText volumeText = null!;
private readonly Bindable<string> sampleBank;
private readonly BindableNumber<int> volume;
public SampleRowAttribute(SampleControlPoint sample)
: base(sample, "sample")
{
sampleBank = sample.SampleBankBindable.GetBoundCopy();
volume = sample.SampleVolumeBindable.GetBoundCopy();
}
[BackgroundDependencyLoader]
private void load()
{
AttributeProgressBar progress;
Content.AddRange(new Drawable[]
{
sampleText = new AttributeText(Point),
progress = new AttributeProgressBar(Point),
volumeText = new AttributeText(Point)
{
Width = 40,
},
});
volume.BindValueChanged(vol =>
{
progress.Current.Value = vol.NewValue / 100f;
updateText();
}, true);
sampleBank.BindValueChanged(_ => updateText(), true);
}
private void updateText()
{
volumeText.Text = $"{volume.Value}%";
sampleText.Text = $"{sampleBank.Value}";
}
}
}