mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 22:56:36 +09:00
Remove settings related to reverse arrow
This commit is contained in:
@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
using osu.Game.Rulesets.Configuration;
|
using osu.Game.Rulesets.Configuration;
|
||||||
using osu.Game.Rulesets.Osu.UI;
|
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Osu.Configuration
|
namespace osu.Game.Rulesets.Osu.Configuration
|
||||||
{
|
{
|
||||||
@ -20,7 +19,6 @@ namespace osu.Game.Rulesets.Osu.Configuration
|
|||||||
Set(OsuRulesetSetting.SnakingInSliders, true);
|
Set(OsuRulesetSetting.SnakingInSliders, true);
|
||||||
Set(OsuRulesetSetting.SnakingOutSliders, true);
|
Set(OsuRulesetSetting.SnakingOutSliders, true);
|
||||||
Set(OsuRulesetSetting.ShowCursorTrail, true);
|
Set(OsuRulesetSetting.ShowCursorTrail, true);
|
||||||
Set(OsuRulesetSetting.ReverseArrowPulse, ReverseArrowPulseMode.Synced);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -28,7 +26,6 @@ namespace osu.Game.Rulesets.Osu.Configuration
|
|||||||
{
|
{
|
||||||
SnakingInSliders,
|
SnakingInSliders,
|
||||||
SnakingOutSliders,
|
SnakingOutSliders,
|
||||||
ShowCursorTrail,
|
ShowCursorTrail
|
||||||
ReverseArrowPulse,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,9 +8,7 @@ using osu.Framework.Bindables;
|
|||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.MathUtils;
|
using osu.Framework.MathUtils;
|
||||||
using osu.Game.Rulesets.Objects.Drawables;
|
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.Objects.Drawables.Pieces;
|
||||||
using osu.Game.Rulesets.Osu.UI;
|
|
||||||
using osu.Game.Rulesets.Scoring;
|
using osu.Game.Rulesets.Scoring;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
|
||||||
@ -21,15 +19,10 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
private readonly RepeatPoint repeatPoint;
|
private readonly RepeatPoint repeatPoint;
|
||||||
private readonly DrawableSlider drawableSlider;
|
private readonly DrawableSlider drawableSlider;
|
||||||
|
|
||||||
public readonly Bindable<ReverseArrowPulseMode> PulseMode = new Bindable<ReverseArrowPulseMode>(ReverseArrowPulseMode.Synced);
|
|
||||||
|
|
||||||
private double animDuration;
|
private double animDuration;
|
||||||
|
|
||||||
private readonly Drawable scaleContainer;
|
private readonly Drawable scaleContainer;
|
||||||
|
|
||||||
[Resolved(CanBeNull = true)]
|
|
||||||
private OsuRulesetConfigManager config { get; set; }
|
|
||||||
|
|
||||||
public DrawableRepeatPoint(RepeatPoint repeatPoint, DrawableSlider drawableSlider)
|
public DrawableRepeatPoint(RepeatPoint repeatPoint, DrawableSlider drawableSlider)
|
||||||
: base(repeatPoint)
|
: base(repeatPoint)
|
||||||
{
|
{
|
||||||
@ -51,8 +44,6 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
{
|
{
|
||||||
scaleBindable.BindValueChanged(scale => scaleContainer.Scale = new Vector2(scale.NewValue), true);
|
scaleBindable.BindValueChanged(scale => scaleContainer.Scale = new Vector2(scale.NewValue), true);
|
||||||
scaleBindable.BindTo(HitObject.ScaleBindable);
|
scaleBindable.BindTo(HitObject.ScaleBindable);
|
||||||
|
|
||||||
config?.BindWith(OsuRulesetSetting.ReverseArrowPulse, PulseMode);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void CheckForResult(bool userTriggered, double timeOffset)
|
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);
|
animDuration = Math.Min(300, repeatPoint.SpanDuration);
|
||||||
|
|
||||||
this.FadeIn(animDuration);
|
this.Animate(
|
||||||
|
d => d.FadeIn(animDuration),
|
||||||
if (PulseMode.Value == ReverseArrowPulseMode.Stable)
|
d => d.ScaleTo(0.5f).ScaleTo(1f, animDuration * 2, Easing.OutElasticHalf)
|
||||||
{
|
);
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void UpdateStateTransforms(ArmedState state)
|
protected override void UpdateStateTransforms(ArmedState state)
|
||||||
|
@ -2,27 +2,18 @@
|
|||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using osu.Framework.Allocation;
|
|
||||||
using osu.Framework.Audio.Track;
|
using osu.Framework.Audio.Track;
|
||||||
using osu.Framework.Bindables;
|
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Game.Beatmaps.ControlPoints;
|
using osu.Game.Beatmaps.ControlPoints;
|
||||||
using osu.Game.Graphics.Containers;
|
using osu.Game.Graphics.Containers;
|
||||||
using osu.Game.Rulesets.Osu.Configuration;
|
|
||||||
using osu.Game.Rulesets.Osu.UI;
|
|
||||||
using osu.Game.Skinning;
|
using osu.Game.Skinning;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
||||||
{
|
{
|
||||||
public class ReverseArrowPiece : BeatSyncedContainer
|
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;
|
private readonly RepeatPoint repeatPoint;
|
||||||
|
|
||||||
public ReverseArrowPiece(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)
|
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);
|
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",
|
LabelText = "Cursor trail",
|
||||||
Bindable = config.GetBindable<bool>(OsuRulesetSetting.ShowCursorTrail)
|
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
|
|
||||||
}
|
|
||||||
}
|
|
Reference in New Issue
Block a user