Fix setting a ProgressNotification's progress too early crashing

This commit is contained in:
Dean Herbert
2017-07-28 16:53:37 +09:00
parent 5dfed1dba5
commit b3e3c4a226

View File

@ -166,7 +166,7 @@ namespace osu.Game.Overlays.Notifications
private class ProgressBar : Container private class ProgressBar : Container
{ {
private Box box; private readonly Box box;
private Color4 colourActive; private Color4 colourActive;
private Color4 colourInactive; private Color4 colourInactive;
@ -196,15 +196,8 @@ namespace osu.Game.Overlays.Notifications
} }
} }
public ProgressBar()
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{ {
colourActive = colours.Blue;
Colour = colourInactive = OsuColour.Gray(0.5f);
Height = 5;
Children = new[] Children = new[]
{ {
box = new Box box = new Box
@ -214,6 +207,15 @@ namespace osu.Game.Overlays.Notifications
} }
}; };
} }
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
colourActive = colours.Blue;
Colour = colourInactive = OsuColour.Gray(0.5f);
Height = 5;
}
} }
} }