mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 11:12:54 +08:00
Replace menu button text with "press for menu" on 0ms activation delay
This commit is contained in:
parent
3907d859f5
commit
911094e790
@ -13,6 +13,7 @@ using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Framework.Input.Bindings;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Framework.MathUtils;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
@ -45,7 +46,6 @@ namespace osu.Game.Screens.Play.HUD
|
||||
{
|
||||
text = new OsuSpriteText
|
||||
{
|
||||
Text = "hold for menu",
|
||||
Font = OsuFont.GetFont(weight: FontWeight.Bold),
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.CentreLeft
|
||||
@ -60,6 +60,14 @@ namespace osu.Game.Screens.Play.HUD
|
||||
AutoSizeAxes = Axes.Both;
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuConfigManager config)
|
||||
{
|
||||
text.Text = config.Get<int>(OsuSetting.UIHoldActivationDelay) > 0
|
||||
? "hold for menu"
|
||||
: "press for menu";
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
text.FadeInFromZero(500, Easing.OutQuint).Delay(1500).FadeOut(500, Easing.OutQuint);
|
||||
|
Loading…
Reference in New Issue
Block a user