1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-05 12:32:58 +08:00

Display "no key bound" when no shortcut

This commit is contained in:
smoogipoo 2018-05-14 19:20:53 +09:00
parent 4b3c2466a4
commit 17861c2a16

View File

@ -101,20 +101,15 @@ namespace osu.Game.Overlays
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
AutoSizeAxes = Axes.Both AutoSizeAxes = Axes.Both
}, },
new Container textLine3 = new OsuSpriteText
{ {
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
AutoSizeAxes = Axes.Both,
Margin = new MarginPadding { Bottom = 15 }, Margin = new MarginPadding { Bottom = 15 },
Font = @"Exo2.0-Bold",
TextSize = 12,
Alpha = 0.3f, Alpha = 0.3f,
Child = textLine3 = new OsuSpriteText },
{
Font = @"Exo2.0-Bold",
TextSize = 12,
AlwaysPresent = true
},
}
} }
} }
} }
@ -183,6 +178,9 @@ namespace osu.Game.Overlays
textLine2.Text = description.Value; textLine2.Text = description.Value;
textLine3.Text = description.Shortcut.ToUpper(); textLine3.Text = description.Shortcut.ToUpper();
if (string.IsNullOrEmpty(textLine3.Text))
textLine3.Text = "NO KEY BOUND";
Display(box); Display(box);
int optionCount = 0; int optionCount = 0;