Skip to content

Commit

Permalink
Fix osu!mania scroll speed milliseconds having too much precision
Browse files Browse the repository at this point in the history
Closes #23750.
  • Loading branch information
peppy committed Jun 9, 2023
1 parent 8962cba commit d5fa8e5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ protected override void InitialiseDefaults()
speed => new SettingDescription(
rawValue: speed,
name: RulesetSettingsStrings.ScrollSpeed,
value: RulesetSettingsStrings.ScrollSpeedTooltip(DrawableManiaRuleset.ComputeScrollTime(speed), speed)
value: RulesetSettingsStrings.ScrollSpeedTooltip((int)DrawableManiaRuleset.ComputeScrollTime(speed), speed)
)
)
};
Expand Down
2 changes: 1 addition & 1 deletion osu.Game.Rulesets.Mania/ManiaSettingsSubsection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ private void load()

private partial class ManiaScrollSlider : RoundedSliderBar<int>
{
public override LocalisableString TooltipText => RulesetSettingsStrings.ScrollSpeedTooltip(DrawableManiaRuleset.ComputeScrollTime(Current.Value), Current.Value);
public override LocalisableString TooltipText => RulesetSettingsStrings.ScrollSpeedTooltip((int)DrawableManiaRuleset.ComputeScrollTime(Current.Value), Current.Value);
}
}
}
2 changes: 1 addition & 1 deletion osu.Game/Localisation/RulesetSettingsStrings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public static class RulesetSettingsStrings
/// <summary>
/// "{0}ms (speed {1})"
/// </summary>
public static LocalisableString ScrollSpeedTooltip(double scrollTime, int scrollSpeed) => new TranslatableString(getKey(@"ruleset"), @"{0:0}ms (speed {1})", scrollTime, scrollSpeed);
public static LocalisableString ScrollSpeedTooltip(int scrollTime, int scrollSpeed) => new TranslatableString(getKey(@"ruleset"), @"{0}ms (speed {1})", scrollTime, scrollSpeed);

private static string getKey(string key) => $@"{prefix}:{key}";
}
Expand Down

0 comments on commit d5fa8e5

Please sign in to comment.