mirror of
https://github.com/ppy/osu
synced 2025-01-10 08:09:40 +00:00
Make ModIcon a bit more safe
This commit is contained in:
parent
1d3dff8c75
commit
53cfc3bc6e
@ -41,7 +41,7 @@ namespace osu.Game.Rulesets.UI
|
||||
{
|
||||
mod = value;
|
||||
|
||||
if (LoadState >= LoadState.Ready)
|
||||
if (IsLoaded)
|
||||
updateMod(value);
|
||||
}
|
||||
}
|
||||
@ -98,13 +98,15 @@ namespace osu.Game.Rulesets.UI
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
updateMod(mod);
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
Selected.BindValueChanged(_ => updateColour(), true);
|
||||
|
||||
Selected.BindValueChanged(_ => updateColour());
|
||||
|
||||
updateMod(mod);
|
||||
}
|
||||
|
||||
private void updateMod(Mod value)
|
||||
|
Loading…
Reference in New Issue
Block a user