mirror of
https://github.com/ppy/osu.git
synced 2024-12-13 08:32:57 +08:00
Add speed value to Toast
This commit is contained in:
parent
f979200712
commit
57da4229ff
@ -50,9 +50,9 @@ namespace osu.Game.Localisation
|
|||||||
public static LocalisableString UrlCopied => new TranslatableString(getKey(@"url_copied"), @"URL copied");
|
public static LocalisableString UrlCopied => new TranslatableString(getKey(@"url_copied"), @"URL copied");
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// "Speed Changed"
|
/// "Speed changed to"
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static LocalisableString SpeedChanged => new TranslatableString(getKey(@"speed_changed"), @"Speed Changed");
|
public static LocalisableString SpeedChangedTo => new TranslatableString(getKey(@"speed_changed"), @"Speed changed to");
|
||||||
|
|
||||||
private static string getKey(string key) => $@"{prefix}:{key}";
|
private static string getKey(string key) => $@"{prefix}:{key}";
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using System.Threading;
|
||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
using osu.Game.Input.Bindings;
|
using osu.Game.Input.Bindings;
|
||||||
using osu.Game.Localisation;
|
using osu.Game.Localisation;
|
||||||
@ -9,8 +10,8 @@ namespace osu.Game.Overlays.OSD
|
|||||||
{
|
{
|
||||||
public partial class SpeedChangeToast : Toast
|
public partial class SpeedChangeToast : Toast
|
||||||
{
|
{
|
||||||
public SpeedChangeToast(OsuConfigManager config, double delta)
|
public SpeedChangeToast(OsuConfigManager config, double newSpeed)
|
||||||
: base(CommonStrings.Beatmaps, ToastStrings.SpeedChanged, config.LookupKeyBindings(GlobalAction.IncreaseModSpeed) + " / " + config.LookupKeyBindings(GlobalAction.DecreaseModSpeed))
|
: base(CommonStrings.Beatmaps, ToastStrings.SpeedChangedTo + " " + newSpeed.ToString(Thread.CurrentThread.CurrentCulture), config.LookupKeyBindings(GlobalAction.IncreaseModSpeed) + " / " + config.LookupKeyBindings(GlobalAction.DecreaseModSpeed))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user