Merge pull request #12316 from peppy/fix-game-mouse-cursor

Fix gameplay mouse cursor being overridden by menu cursor
This commit is contained in:
Dan Balasescu 2021-04-07 20:38:40 +09:00 committed by GitHub
commit e667b1fad0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -308,17 +308,15 @@ namespace osu.Game
AddInternal(RulesetConfigCache);
MenuCursorContainer = new MenuCursorContainer { RelativeSizeAxes = Axes.Both };
GlobalInputManager globalInput;
MenuCursorContainer.Child = globalInput = new GlobalInputManager(this)
var globalInput = new GlobalInputManager(this)
{
RelativeSizeAxes = Axes.Both,
Child = content = new OsuTooltipContainer(MenuCursorContainer.Cursor) { RelativeSizeAxes = Axes.Both }
Child = MenuCursorContainer = new MenuCursorContainer { RelativeSizeAxes = Axes.Both }
};
base.Content.Add(CreateScalingContainer().WithChild(MenuCursorContainer));
MenuCursorContainer.Child = content = new OsuTooltipContainer(MenuCursorContainer.Cursor) { RelativeSizeAxes = Axes.Both };
base.Content.Add(CreateScalingContainer().WithChild(globalInput));
KeyBindingStore.Register(globalInput.GlobalBindings);
dependencies.Cache(globalInput.GlobalBindings);