Move incompatibility icon logic to local player mod select overlays

This commit is contained in:
Salman Ahmed
2021-08-28 02:37:46 +03:00
parent 69f5705ca0
commit e527bfd4bf
4 changed files with 96 additions and 50 deletions

View File

@ -51,14 +51,14 @@ namespace osu.Game.Overlays.Mods
if (m == null)
return new ModButtonEmpty();
return new ModButton(m)
return CreateModButton(m).With(b =>
{
SelectionChanged = mod =>
b.SelectionChanged = mod =>
{
ModButtonStateChanged(mod);
Action?.Invoke(mod);
},
};
};
});
}).ToArray();
modsLoadCts?.Cancel();
@ -247,6 +247,8 @@ namespace osu.Game.Overlays.Mods
Text = text
};
protected virtual ModButton CreateModButton(Mod mod) => new ModButton(mod);
/// <summary>
/// Play out all remaining animations immediately to leave mods in a good (final) state.
/// </summary>