mirror of
https://github.com/ppy/osu.git
synced 2026-05-21 05:09:57 +08:00
Rename some variables
This commit is contained in:
@@ -63,11 +63,11 @@ namespace osu.Game.Screens.Play.PlayerSettings
|
||||
[Resolved]
|
||||
private IGameplayClock? gameplayClock { get; set; }
|
||||
|
||||
private double lastPlayAverage;
|
||||
private double lastPlayMedian;
|
||||
private double lastPlayBeatmapOffset;
|
||||
private HitEventTimingDistributionGraph? lastPlayGraph;
|
||||
|
||||
private SettingsButton? useAverageButton;
|
||||
private SettingsButton? calibrateFromLastPlayButton;
|
||||
|
||||
private IDisposable? beatmapOffsetSubscription;
|
||||
|
||||
@@ -226,7 +226,7 @@ namespace osu.Game.Screens.Play.PlayerSettings
|
||||
return;
|
||||
}
|
||||
|
||||
lastPlayAverage = median;
|
||||
lastPlayMedian = median;
|
||||
lastPlayBeatmapOffset = Current.Value;
|
||||
|
||||
LinkFlowContainer globalOffsetText;
|
||||
@@ -239,7 +239,7 @@ namespace osu.Game.Screens.Play.PlayerSettings
|
||||
Height = 50,
|
||||
},
|
||||
new AverageHitError(hitEvents),
|
||||
useAverageButton = new SettingsButton
|
||||
calibrateFromLastPlayButton = new SettingsButton
|
||||
{
|
||||
Text = BeatmapOffsetControlStrings.CalibrateUsingLastPlay,
|
||||
Action = () =>
|
||||
@@ -247,7 +247,7 @@ namespace osu.Game.Screens.Play.PlayerSettings
|
||||
if (Current.Disabled)
|
||||
return;
|
||||
|
||||
Current.Value = lastPlayBeatmapOffset - lastPlayAverage;
|
||||
Current.Value = lastPlayBeatmapOffset - lastPlayMedian;
|
||||
lastAppliedScore.Value = ReferenceScore.Value;
|
||||
},
|
||||
},
|
||||
@@ -281,8 +281,8 @@ namespace osu.Game.Screens.Play.PlayerSettings
|
||||
|
||||
bool allow = allowOffsetAdjust;
|
||||
|
||||
if (useAverageButton != null)
|
||||
useAverageButton.Enabled.Value = allow && !Precision.AlmostEquals(lastPlayAverage, adjustmentSinceLastPlay, Current.Precision / 2);
|
||||
if (calibrateFromLastPlayButton != null)
|
||||
calibrateFromLastPlayButton.Enabled.Value = allow && !Precision.AlmostEquals(lastPlayMedian, adjustmentSinceLastPlay, Current.Precision / 2);
|
||||
|
||||
Current.Disabled = !allow;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user