diff --git a/osu.Game/Modes/Mod.cs b/osu.Game/Modes/Mod.cs index d8f616663f..d51de7ece1 100644 --- a/osu.Game/Modes/Mod.cs +++ b/osu.Game/Modes/Mod.cs @@ -137,7 +137,7 @@ namespace osu.Game.Modes switch (mode) { case PlayMode.Osu: - return "You don't need to click. \nGive your clicking/tapping finger a break from the heat of things."; + return "You don't need to click.\nGive your clicking/tapping finger a break from the heat of things."; case PlayMode.Taiko: return @"Relax! You will no longer get dizzyfied by ninja-like spinners, demanding drumrolls or unexpected katu's."; diff --git a/osu.Game/Overlays/Mods/ModSelectOverlay.cs b/osu.Game/Overlays/Mods/ModSelectOverlay.cs index ac261606ef..ccb58bae22 100644 --- a/osu.Game/Overlays/Mods/ModSelectOverlay.cs +++ b/osu.Game/Overlays/Mods/ModSelectOverlay.cs @@ -15,6 +15,9 @@ using osu.Game.Graphics.Backgrounds; using osu.Game.Graphics.Sprites; using osu.Game.Modes; using osu.Framework.Allocation; +using osu.Framework.Input; +using OpenTK.Input; +using System.Linq; namespace osu.Game.Overlays.Mods { @@ -84,6 +87,28 @@ namespace osu.Game.Overlays.Mods } } + public override bool RequestingFocus => State == Visibility.Visible; + + protected override bool OnFocus(InputState state) => true; + protected override void OnFocusLost(InputState state) + { + if (state.Keyboard.Keys.Contains(Key.Escape)) + Hide(); + base.OnFocusLost(state); + } + + protected override void PopIn() + { + base.PopIn(); + Schedule(TriggerFocusContention); + } + + protected override void PopOut() + { + base.PopOut(); + TriggerFocusLost(); + } + protected override void TransitionIn() { rankedMultiplerContainer.MoveToX(0, ranked_multiplier_duration, EasingTypes.OutQuint);