2019-10-27 14:19:36 +08:00
|
|
|
using osu.Framework.Allocation;
|
|
|
|
using osu.Game.Beatmaps.ControlPoints;
|
|
|
|
using osu.Game.Graphics.Sprites;
|
|
|
|
|
|
|
|
namespace osu.Game.Screens.Edit.Timing
|
|
|
|
{
|
|
|
|
internal class DifficultySection : Section<DifficultyControlPoint>
|
|
|
|
{
|
|
|
|
private OsuSpriteText multiplier;
|
|
|
|
|
|
|
|
[BackgroundDependencyLoader]
|
|
|
|
private void load()
|
|
|
|
{
|
|
|
|
Flow.AddRange(new[]
|
|
|
|
{
|
|
|
|
multiplier = new OsuSpriteText(),
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
protected override void LoadComplete()
|
|
|
|
{
|
|
|
|
base.LoadComplete();
|
|
|
|
|
2019-10-28 11:31:38 +08:00
|
|
|
ControlPoint.BindValueChanged(point => { multiplier.Text = $"Multiplier: {point.NewValue?.SpeedMultiplier::0.##}x"; });
|
2019-10-27 14:19:36 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
protected override DifficultyControlPoint CreatePoint()
|
|
|
|
{
|
|
|
|
var reference = Beatmap.Value.Beatmap.ControlPointInfo.DifficultyPointAt(SelectedGroup.Value.Time);
|
|
|
|
|
|
|
|
return new DifficultyControlPoint
|
|
|
|
{
|
|
|
|
SpeedMultiplier = reference.SpeedMultiplier,
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|