2019-10-28 11:42:17 +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.
|
|
|
|
|
2019-10-27 14:19:36 +08:00
|
|
|
using osu.Framework.Allocation;
|
2019-11-06 13:36:43 +08:00
|
|
|
using osu.Framework.Bindables;
|
2019-10-27 14:19:36 +08:00
|
|
|
using osu.Game.Beatmaps.ControlPoints;
|
|
|
|
using osu.Game.Graphics.Sprites;
|
|
|
|
|
|
|
|
namespace osu.Game.Screens.Edit.Timing
|
|
|
|
{
|
|
|
|
internal class EffectSection : Section<EffectControlPoint>
|
|
|
|
{
|
|
|
|
private OsuSpriteText kiai;
|
|
|
|
private OsuSpriteText omitBarLine;
|
|
|
|
|
|
|
|
[BackgroundDependencyLoader]
|
|
|
|
private void load()
|
|
|
|
{
|
|
|
|
Flow.AddRange(new[]
|
|
|
|
{
|
|
|
|
kiai = new OsuSpriteText(),
|
|
|
|
omitBarLine = new OsuSpriteText(),
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2019-11-06 13:36:43 +08:00
|
|
|
protected override void OnControlPointChanged(ValueChangedEvent<EffectControlPoint> point)
|
2019-10-27 14:19:36 +08:00
|
|
|
{
|
2019-11-06 13:36:43 +08:00
|
|
|
kiai.Text = $"Kiai: {(point.NewValue?.KiaiMode == true ? "on" : "off")}";
|
|
|
|
omitBarLine.Text = $"Skip Bar Line: {(point.NewValue?.OmitFirstBarLine == true ? "on" : "off")}";
|
2019-10-27 14:19:36 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
protected override EffectControlPoint CreatePoint()
|
|
|
|
{
|
|
|
|
var reference = Beatmap.Value.Beatmap.ControlPointInfo.EffectPointAt(SelectedGroup.Value.Time);
|
|
|
|
|
|
|
|
return new EffectControlPoint
|
|
|
|
{
|
|
|
|
KiaiMode = reference.KiaiMode,
|
|
|
|
OmitFirstBarLine = reference.OmitFirstBarLine
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|