mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 23:12:56 +08:00
Remove settings related to reverse arrow
This commit is contained in:
parent
3194658998
commit
21468eb070
@ -3,7 +3,6 @@
|
||||
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Rulesets.Configuration;
|
||||
using osu.Game.Rulesets.Osu.UI;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Configuration
|
||||
{
|
||||
@ -20,7 +19,6 @@ namespace osu.Game.Rulesets.Osu.Configuration
|
||||
Set(OsuRulesetSetting.SnakingInSliders, true);
|
||||
Set(OsuRulesetSetting.SnakingOutSliders, true);
|
||||
Set(OsuRulesetSetting.ShowCursorTrail, true);
|
||||
Set(OsuRulesetSetting.ReverseArrowPulse, ReverseArrowPulseMode.Synced);
|
||||
}
|
||||
}
|
||||
|
||||
@ -28,7 +26,6 @@ namespace osu.Game.Rulesets.Osu.Configuration
|
||||
{
|
||||
SnakingInSliders,
|
||||
SnakingOutSliders,
|
||||
ShowCursorTrail,
|
||||
ReverseArrowPulse,
|
||||
ShowCursorTrail
|
||||
}
|
||||
}
|
||||
|
@ -8,9 +8,7 @@ using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.MathUtils;
|
||||
using osu.Game.Rulesets.Objects.Drawables;
|
||||
using osu.Game.Rulesets.Osu.Configuration;
|
||||
using osu.Game.Rulesets.Osu.Objects.Drawables.Pieces;
|
||||
using osu.Game.Rulesets.Osu.UI;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
using osuTK;
|
||||
|
||||
@ -21,15 +19,10 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
private readonly RepeatPoint repeatPoint;
|
||||
private readonly DrawableSlider drawableSlider;
|
||||
|
||||
public readonly Bindable<ReverseArrowPulseMode> PulseMode = new Bindable<ReverseArrowPulseMode>(ReverseArrowPulseMode.Synced);
|
||||
|
||||
private double animDuration;
|
||||
|
||||
private readonly Drawable scaleContainer;
|
||||
|
||||
[Resolved(CanBeNull = true)]
|
||||
private OsuRulesetConfigManager config { get; set; }
|
||||
|
||||
public DrawableRepeatPoint(RepeatPoint repeatPoint, DrawableSlider drawableSlider)
|
||||
: base(repeatPoint)
|
||||
{
|
||||
@ -51,8 +44,6 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
{
|
||||
scaleBindable.BindValueChanged(scale => scaleContainer.Scale = new Vector2(scale.NewValue), true);
|
||||
scaleBindable.BindTo(HitObject.ScaleBindable);
|
||||
|
||||
config?.BindWith(OsuRulesetSetting.ReverseArrowPulse, PulseMode);
|
||||
}
|
||||
|
||||
protected override void CheckForResult(bool userTriggered, double timeOffset)
|
||||
@ -65,21 +56,10 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
{
|
||||
animDuration = Math.Min(300, repeatPoint.SpanDuration);
|
||||
|
||||
this.FadeIn(animDuration);
|
||||
|
||||
if (PulseMode.Value == ReverseArrowPulseMode.Stable)
|
||||
{
|
||||
double fadeInStart = repeatPoint.StartTime - 2 * repeatPoint.SpanDuration;
|
||||
|
||||
// We want first repeat arrow to start pulsing during snake in
|
||||
if (repeatPoint.RepeatIndex == 0)
|
||||
fadeInStart -= repeatPoint.TimePreempt;
|
||||
|
||||
for (double pulseStartTime = fadeInStart; pulseStartTime < repeatPoint.StartTime; pulseStartTime += 300)
|
||||
this.Delay(pulseStartTime - LifetimeStart).ScaleTo(1.3f).ScaleTo(1f, Math.Min(300, repeatPoint.StartTime - pulseStartTime), Easing.Out);
|
||||
}
|
||||
else if (PulseMode.Value == ReverseArrowPulseMode.Off)
|
||||
this.ScaleTo(0.5f).ScaleTo(1f, animDuration * 2, Easing.OutElasticHalf);
|
||||
this.Animate(
|
||||
d => d.FadeIn(animDuration),
|
||||
d => d.ScaleTo(0.5f).ScaleTo(1f, animDuration * 2, Easing.OutElasticHalf)
|
||||
);
|
||||
}
|
||||
|
||||
protected override void UpdateStateTransforms(ArmedState state)
|
||||
|
@ -2,27 +2,18 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Audio.Track;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics;
|
||||
using osuTK;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Game.Beatmaps.ControlPoints;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Rulesets.Osu.Configuration;
|
||||
using osu.Game.Rulesets.Osu.UI;
|
||||
using osu.Game.Skinning;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
||||
{
|
||||
public class ReverseArrowPiece : BeatSyncedContainer
|
||||
{
|
||||
public readonly Bindable<ReverseArrowPulseMode> PulseMode = new Bindable<ReverseArrowPulseMode>(ReverseArrowPulseMode.Synced);
|
||||
|
||||
[Resolved(CanBeNull = true)]
|
||||
private OsuRulesetConfigManager config { get; set; }
|
||||
|
||||
private readonly RepeatPoint repeatPoint;
|
||||
|
||||
public ReverseArrowPiece(RepeatPoint repeatPoint)
|
||||
@ -50,14 +41,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
||||
|
||||
protected override void OnNewBeat(int beatIndex, TimingControlPoint timingPoint, EffectControlPoint effectPoint, TrackAmplitudes amplitudes)
|
||||
{
|
||||
if (PulseMode.Value == ReverseArrowPulseMode.Synced && Clock.CurrentTime < repeatPoint.StartTime)
|
||||
if (Clock.CurrentTime < repeatPoint.StartTime)
|
||||
InternalChild.ScaleTo(1.3f).ScaleTo(1f, Math.Min(timingPoint.BeatLength, repeatPoint.StartTime - Clock.CurrentTime), Easing.Out);
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
config?.BindWith(OsuRulesetSetting.ReverseArrowPulse, PulseMode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -39,11 +39,6 @@ namespace osu.Game.Rulesets.Osu.UI
|
||||
LabelText = "Cursor trail",
|
||||
Bindable = config.GetBindable<bool>(OsuRulesetSetting.ShowCursorTrail)
|
||||
},
|
||||
new SettingsEnumDropdown<ReverseArrowPulseMode>
|
||||
{
|
||||
LabelText = "Slider reverse arrow pulse",
|
||||
Bindable = config.GetBindable<ReverseArrowPulseMode>(OsuRulesetSetting.ReverseArrowPulse)
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -1,18 +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 System.ComponentModel;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.UI
|
||||
{
|
||||
public enum ReverseArrowPulseMode
|
||||
{
|
||||
Off,
|
||||
|
||||
[Description("Match osu!stable")]
|
||||
Stable,
|
||||
|
||||
[Description("Sync to beatmap")]
|
||||
Synced
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user