Ensure GlobalActions are handled before anything else game-wide

This commit is contained in:
Dean Herbert
2021-03-30 19:03:15 +09:00
parent f40cf499bc
commit 05961e98d5
3 changed files with 44 additions and 6 deletions

View File

@ -310,9 +310,9 @@ namespace osu.Game
MenuCursorContainer = new MenuCursorContainer { RelativeSizeAxes = Axes.Both };
GlobalActionContainer globalBindings;
GlobalInputManager globalInput;
MenuCursorContainer.Child = globalBindings = new GlobalActionContainer(this)
MenuCursorContainer.Child = globalInput = new GlobalInputManager(this)
{
RelativeSizeAxes = Axes.Both,
Child = content = new OsuTooltipContainer(MenuCursorContainer.Cursor) { RelativeSizeAxes = Axes.Both }
@ -320,8 +320,8 @@ namespace osu.Game
base.Content.Add(CreateScalingContainer().WithChild(MenuCursorContainer));
KeyBindingStore.Register(globalBindings);
dependencies.Cache(globalBindings);
KeyBindingStore.Register(globalInput.GlobalBindings);
dependencies.Cache(globalInput.GlobalBindings);
PreviewTrackManager previewTrackManager;
dependencies.Cache(previewTrackManager = new PreviewTrackManager());