1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:57:39 +08:00

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 Box box;
private readonly Box box;
private Color4 colourActive;
private Color4 colourInactive;
@ -196,15 +196,8 @@ namespace osu.Game.Overlays.Notifications
}
}
[BackgroundDependencyLoader]
private void load(OsuColour colours)
public ProgressBar()
{
colourActive = colours.Blue;
Colour = colourInactive = OsuColour.Gray(0.5f);
Height = 5;
Children = new[]
{
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;
}
}
}