1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 00:47:24 +08:00

Expose the global binding container to OsuGameTestScene

This commit is contained in:
Salman Ahmed 2020-09-04 10:23:06 +03:00
parent 001509df55
commit 4d9a06bde9
2 changed files with 8 additions and 5 deletions

View File

@ -14,6 +14,7 @@ using osu.Framework.Testing;
using osu.Game.Beatmaps;
using osu.Game.Configuration;
using osu.Game.Graphics.UserInterface;
using osu.Game.Input.Bindings;
using osu.Game.Online.API;
using osu.Game.Overlays;
using osu.Game.Rulesets;
@ -109,6 +110,8 @@ namespace osu.Game.Tests.Visual.Navigation
public new OsuConfigManager LocalConfig => base.LocalConfig;
public new GlobalActionContainer GlobalBinding => base.GlobalBinding;
public new Bindable<WorkingBeatmap> Beatmap => base.Beatmap;
public new Bindable<RulesetInfo> Ruleset => base.Ruleset;

View File

@ -64,6 +64,8 @@ namespace osu.Game
protected FileStore FileStore;
protected GlobalActionContainer GlobalBinding;
protected KeyBindingStore KeyBindingStore;
protected SettingsStore SettingsStore;
@ -250,10 +252,8 @@ namespace osu.Game
AddInternal(apiAccess);
AddInternal(RulesetConfigCache);
GlobalActionContainer globalBinding;
MenuCursorContainer = new MenuCursorContainer { RelativeSizeAxes = Axes.Both };
MenuCursorContainer.Child = globalBinding = new GlobalActionContainer(this)
MenuCursorContainer.Child = GlobalBinding = new GlobalActionContainer(this)
{
RelativeSizeAxes = Axes.Both,
Child = content = new OsuTooltipContainer(MenuCursorContainer.Cursor) { RelativeSizeAxes = Axes.Both }
@ -261,8 +261,8 @@ namespace osu.Game
base.Content.Add(CreateScalingContainer().WithChild(MenuCursorContainer));
KeyBindingStore.Register(globalBinding);
dependencies.Cache(globalBinding);
KeyBindingStore.Register(GlobalBinding);
dependencies.Cache(GlobalBinding);
PreviewTrackManager previewTrackManager;
dependencies.Cache(previewTrackManager = new PreviewTrackManager());