1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-13 12:02:54 +08:00

Move more toolbar to async load

This commit is contained in:
Dean Herbert 2019-03-08 12:01:40 +09:00
parent 11e5c6a2a0
commit 075ea70124

View File

@ -22,7 +22,7 @@ namespace osu.Game.Overlays.Toolbar
public Action OnHome;
private readonly ToolbarUserArea userArea;
private ToolbarUserArea userArea;
protected override bool BlockPositionalInput => false;
@ -33,7 +33,8 @@ namespace osu.Game.Overlays.Toolbar
private readonly Bindable<OverlayActivation> overlayActivationMode = new Bindable<OverlayActivation>(OverlayActivation.All);
public Toolbar()
[BackgroundDependencyLoader(true)]
private void load(OsuGame osuGame)
{
Children = new Drawable[]
{
@ -78,11 +79,7 @@ namespace osu.Game.Overlays.Toolbar
RelativeSizeAxes = Axes.X;
Size = new Vector2(1, HEIGHT);
}
[BackgroundDependencyLoader(true)]
private void load(OsuGame osuGame)
{
StateChanged += visibility =>
{
if (overlayActivationMode.Value == OverlayActivation.Disabled)