mirror of
https://github.com/ppy/osu.git
synced 2025-03-23 08:27:23 +08:00
Use 3x speed instead when beat snap divisor is divisible by 3
This commit is contained in:
parent
8be500535d
commit
aa6763785c
@ -42,6 +42,9 @@ namespace osu.Game.Screens.Edit.Timing
|
||||
[Resolved]
|
||||
private OverlayColourProvider overlayColourProvider { get; set; } = null!;
|
||||
|
||||
[Resolved]
|
||||
private BindableBeatDivisor beatDivisor { get; set; } = null!;
|
||||
|
||||
public bool EnableClicking
|
||||
{
|
||||
get => metronomeTick.EnableClicking;
|
||||
@ -233,10 +236,17 @@ namespace osu.Game.Screens.Edit.Timing
|
||||
|
||||
private ScheduledDelegate? latchDelegate;
|
||||
|
||||
private bool spedUp;
|
||||
|
||||
private bool divisorChanged;
|
||||
|
||||
private void setDivisor(int divisor)
|
||||
private void updateDivisor()
|
||||
{
|
||||
int divisor = 1;
|
||||
|
||||
if (spedUp)
|
||||
divisor = beatDivisor.Value % 3 == 0 ? 3 : 2;
|
||||
|
||||
if (divisor == Divisor)
|
||||
return;
|
||||
|
||||
@ -264,6 +274,8 @@ namespace osu.Game.Screens.Edit.Timing
|
||||
|
||||
timingPoint = BeatSyncSource.ControlPoints.TimingPointAt(BeatSyncSource.Clock.CurrentTime);
|
||||
|
||||
updateDivisor();
|
||||
|
||||
if (beatLength != timingPoint.BeatLength || divisorChanged)
|
||||
{
|
||||
beatLength = timingPoint.BeatLength;
|
||||
@ -346,7 +358,7 @@ namespace osu.Game.Screens.Edit.Timing
|
||||
updateDivisorFromKey(e);
|
||||
}
|
||||
|
||||
private void updateDivisorFromKey(UIEvent e) => setDivisor(e.ControlPressed ? 2 : 1);
|
||||
private void updateDivisorFromKey(UIEvent e) => spedUp = e.ControlPressed;
|
||||
|
||||
private partial class MetronomeTick : BeatSyncedContainer
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user