1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 06:07:25 +08:00

Make checkbox also respond to all mods selected

This commit is contained in:
smoogipoo 2021-02-02 11:11:28 +09:00
parent f166c4c414
commit 4cf52077b6

View File

@ -57,12 +57,8 @@ namespace osu.Game.Screens.OnlinePlay.Match
{
base.Update();
// If any of the buttons aren't selected, deselect the checkbox.
foreach (var button in ButtonsContainer.OfType<ModButton>())
{
if (button.Mods.Any(m => m.HasImplementation) && !button.Selected)
checkbox.Current.Value = false;
}
var validButtons = ButtonsContainer.OfType<ModButton>().Where(b => b.Mod.HasImplementation);
checkbox.Current.Value = validButtons.All(b => b.Selected);
}
}