Rewrite the way that cursor overrides are done game-wide

This commit is contained in:
smoogipoo
2018-01-12 18:13:17 +09:00
parent 2e235660ad
commit 512e4d2c9f
15 changed files with 132 additions and 60 deletions

View File

@ -52,8 +52,6 @@ namespace osu.Game
protected override Container<Drawable> Content => content;
protected MenuCursor Cursor;
public Bindable<WorkingBeatmap> Beatmap { get; private set; }
private Bindable<bool> fpsDisplayVisible;
@ -211,21 +209,14 @@ namespace osu.Game
GlobalKeyBindingInputManager globalBinding;
base.Content.Add(new DrawSizePreservingFillContainer
var cursorContainer = new OsuCursorContainer { RelativeSizeAxes = Axes.Both };
cursorContainer.Child = globalBinding = new GlobalKeyBindingInputManager(this)
{
Children = new Drawable[]
{
Cursor = new MenuCursor(),
globalBinding = new GlobalKeyBindingInputManager(this)
{
RelativeSizeAxes = Axes.Both,
Child = content = new OsuTooltipContainer(Cursor)
{
RelativeSizeAxes = Axes.Both,
}
}
}
});
RelativeSizeAxes = Axes.Both,
Child = content = new OsuTooltipContainer(cursorContainer.LocalCursor) { RelativeSizeAxes = Axes.Both }
};
base.Content.Add(new DrawSizePreservingFillContainer { Child = cursorContainer });
KeyBindingStore.Register(globalBinding);
dependencies.Cache(globalBinding);