mirror of
https://github.com/ppy/osu.git
synced 2025-03-12 23:58:28 +08:00
Add safeties against attempting to apply previous play while offset adjust is not allowed
This should theoretically not be possible, but while we are sharing this control's implementation between gameplay and non-gameplay usages, let's ensure nothing weird can occur.
This commit is contained in:
parent
7aceb2e349
commit
6a74f9f902
@ -245,6 +245,9 @@ namespace osu.Game.Screens.Play.PlayerSettings
|
||||
Text = BeatmapOffsetControlStrings.CalibrateUsingLastPlay,
|
||||
Action = () =>
|
||||
{
|
||||
if (Current.Disabled)
|
||||
return;
|
||||
|
||||
Current.Value = lastPlayBeatmapOffset - lastPlayAverage;
|
||||
lastAppliedScore.Value = ReferenceScore.Value;
|
||||
},
|
||||
@ -277,6 +280,9 @@ namespace osu.Game.Screens.Play.PlayerSettings
|
||||
protected override void Update()
|
||||
{
|
||||
base.Update();
|
||||
|
||||
if (useAverageButton != null)
|
||||
useAverageButton.Enabled.Value = allowOffsetAdjust;
|
||||
Current.Disabled = !allowOffsetAdjust;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user