Close customisation area on escape press before exiting

This commit is contained in:
Bartłomiej Dach 2022-05-05 17:08:02 +02:00
parent 8002726c9c
commit 79e1b93b30
No known key found for this signature in database
GPG Key ID: BCECCD4FA41F6497

View File

@ -18,6 +18,7 @@ using osu.Game.Configuration;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers;
using osu.Game.Graphics.UserInterface;
using osu.Game.Input.Bindings;
using osu.Game.Rulesets.Mods;
using osuTK;
using osuTK.Input;
@ -315,6 +316,17 @@ namespace osu.Game.Overlays.Mods
}
}
public override bool OnPressed(KeyBindingPressEvent<GlobalAction> e)
{
if (e.Action == GlobalAction.Back && customisationVisible.Value)
{
customisationVisible.Value = false;
return true;
}
return base.OnPressed(e);
}
internal class ColumnScrollContainer : OsuScrollContainer<ColumnFlowContainer>
{
public ColumnScrollContainer()