mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 00:02:54 +08:00
Make checkbox also respond to all mods selected
This commit is contained in:
parent
f166c4c414
commit
4cf52077b6
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user