1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-13 10:33:07 +08:00

Fix calibration button disabled state not checking in corrrect direction

This commit is contained in:
Dean Herbert 2022-03-02 14:36:15 +09:00
parent c07f754565
commit 3cbcb702f6
2 changed files with 2 additions and 1 deletions

View File

@ -66,6 +66,7 @@ namespace osu.Game.Tests.Visual.Gameplay
AddStep("Press button", () => offsetControl.ChildrenOfType<SettingsButton>().Single().TriggerClick());
AddAssert("Offset is adjusted", () => offsetControl.Current.Value == -average_error);
AddAssert("Button is disabled", () => !offsetControl.ChildrenOfType<SettingsButton>().Single().Enabled.Value);
AddStep("Remove reference score", () => offsetControl.ReferenceScore.Value = null);
AddAssert("No calibration button", () => !offsetControl.ChildrenOfType<SettingsButton>().Any());
}

View File

@ -131,7 +131,7 @@ namespace osu.Game.Screens.Play.PlayerSettings
}
if (useAverageButton != null)
useAverageButton.Enabled.Value = !Precision.AlmostEquals(lastPlayAverage, Current.Value, Current.Precision);
useAverageButton.Enabled.Value = !Precision.AlmostEquals(lastPlayAverage, -Current.Value, Current.Precision);
realmWriteTask = realm.WriteAsync(r =>
{