1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 11:27:24 +08:00
osu-lazer/osu.Game/Screens/Edit/Timing/EffectSection.cs

45 lines
1.2 KiB
C#

using osu.Framework.Allocation;
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(),
});
}
protected override void LoadComplete()
{
base.LoadComplete();
ControlPoint.BindValueChanged(point =>
{
kiai.Text = $"Kiai: {point.NewValue?.KiaiMode}";
omitBarLine.Text = $"Skip Bar Line: {point.NewValue?.OmitFirstBarLine}";
});
}
protected override EffectControlPoint CreatePoint()
{
var reference = Beatmap.Value.Beatmap.ControlPointInfo.EffectPointAt(SelectedGroup.Value.Time);
return new EffectControlPoint
{
KiaiMode = reference.KiaiMode,
OmitFirstBarLine = reference.OmitFirstBarLine
};
}
}
}