mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 15:22:55 +08:00
No longer keep menu open when CTRL is held
This commit is contained in:
parent
e0e7e123bf
commit
21917218ce
@ -2,9 +2,8 @@
|
|||||||
// 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 osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Graphics;
|
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Framework.Input;
|
using osu.Framework.Graphics;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
|
||||||
namespace osu.Game.Graphics.UserInterface
|
namespace osu.Game.Graphics.UserInterface
|
||||||
@ -20,15 +19,8 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
|
|
||||||
protected override TextContainer CreateTextContainer() => new ToggleTextContainer(Item);
|
protected override TextContainer CreateTextContainer() => new ToggleTextContainer(Item);
|
||||||
|
|
||||||
private InputManager inputManager = null!;
|
|
||||||
|
|
||||||
public override bool CloseMenuOnClick => !inputManager.CurrentState.Keyboard.ControlPressed;
|
|
||||||
|
|
||||||
protected override void LoadComplete()
|
|
||||||
{
|
{
|
||||||
base.LoadComplete();
|
|
||||||
|
|
||||||
inputManager = GetContainingInputManager();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private partial class ToggleTextContainer : TextContainer
|
private partial class ToggleTextContainer : TextContainer
|
||||||
|
Loading…
Reference in New Issue
Block a user