mirror of
https://github.com/ppy/osu
synced 2025-02-12 16:17:16 +00:00
Rename bool arguments for readability
This commit is contained in:
parent
5f0a345eeb
commit
e6ddd0380e
@ -80,15 +80,15 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
private void applyRateAdjustment(double amount) =>
|
private void applyRateAdjustment(double amount) =>
|
||||||
SpeedChange.Value = InitialRate.Value + (FinalRate.Value - InitialRate.Value) * Math.Clamp(amount, 0, 1);
|
SpeedChange.Value = InitialRate.Value + (FinalRate.Value - InitialRate.Value) * Math.Clamp(amount, 0, 1);
|
||||||
|
|
||||||
private void applyPitchAdjustment(ValueChangedEvent<bool> value)
|
private void applyPitchAdjustment(ValueChangedEvent<bool> adjustPitchSetting)
|
||||||
{
|
{
|
||||||
// remove existing old adjustment
|
// remove existing old adjustment
|
||||||
track.RemoveAdjustment(adjustmentForPitchSetting(value.OldValue), SpeedChange);
|
track.RemoveAdjustment(adjustmentForPitchSetting(adjustPitchSetting.OldValue), SpeedChange);
|
||||||
|
|
||||||
track.AddAdjustment(adjustmentForPitchSetting(value.NewValue), SpeedChange);
|
track.AddAdjustment(adjustmentForPitchSetting(adjustPitchSetting.NewValue), SpeedChange);
|
||||||
}
|
}
|
||||||
|
|
||||||
private AdjustableProperty adjustmentForPitchSetting(bool value)
|
private AdjustableProperty adjustmentForPitchSetting(bool adjustPitchSettingValue)
|
||||||
=> value ? AdjustableProperty.Frequency : AdjustableProperty.Tempo;
|
=> adjustPitchSettingValue ? AdjustableProperty.Frequency : AdjustableProperty.Tempo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user