2019-10-28 03:42:17 +00: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 06:19:36 +00:00
|
|
|
using osu.Framework.Allocation;
|
2019-11-06 05:36:43 +00:00
|
|
|
using osu.Framework.Bindables;
|
2019-10-27 06:19:36 +00:00
|
|
|
using osu.Game.Beatmaps.ControlPoints;
|
2019-10-28 07:21:31 +00:00
|
|
|
using osu.Game.Graphics.UserInterfaceV2;
|
2019-10-27 06:19:36 +00:00
|
|
|
|
|
|
|
namespace osu.Game.Screens.Edit.Timing
|
|
|
|
{
|
|
|
|
internal class EffectSection : Section<EffectControlPoint>
|
|
|
|
{
|
2019-10-28 07:21:31 +00:00
|
|
|
private LabelledSwitchButton kiai;
|
|
|
|
private LabelledSwitchButton omitBarLine;
|
2019-10-27 06:19:36 +00:00
|
|
|
|
|
|
|
[BackgroundDependencyLoader]
|
|
|
|
private void load()
|
|
|
|
{
|
|
|
|
Flow.AddRange(new[]
|
|
|
|
{
|
2019-10-28 07:21:31 +00:00
|
|
|
kiai = new LabelledSwitchButton { Label = "Kiai Time" },
|
|
|
|
omitBarLine = new LabelledSwitchButton { Label = "Skip Bar Line" },
|
2019-10-27 06:19:36 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2019-11-06 05:36:43 +00:00
|
|
|
protected override void OnControlPointChanged(ValueChangedEvent<EffectControlPoint> point)
|
2019-10-27 06:19:36 +00:00
|
|
|
{
|
2019-11-06 07:22:55 +00:00
|
|
|
if (point.NewValue != null)
|
2019-10-27 06:19:36 +00:00
|
|
|
{
|
2019-11-06 07:22:55 +00:00
|
|
|
kiai.Current = point.NewValue.KiaiModeBindable;
|
|
|
|
omitBarLine.Current = point.NewValue.OmitFirstBarLineBindable;
|
|
|
|
}
|
2019-10-27 06:19:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
protected override EffectControlPoint CreatePoint()
|
|
|
|
{
|
|
|
|
var reference = Beatmap.Value.Beatmap.ControlPointInfo.EffectPointAt(SelectedGroup.Value.Time);
|
|
|
|
|
|
|
|
return new EffectControlPoint
|
|
|
|
{
|
|
|
|
KiaiMode = reference.KiaiMode,
|
|
|
|
OmitFirstBarLine = reference.OmitFirstBarLine
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|