Make apply default methods more explicit in behaviour

This commit is contained in:
Dean Herbert
2022-04-27 15:59:39 +09:00
parent 4638dd97db
commit 0343687b85
3 changed files with 27 additions and 17 deletions

View File

@ -1,6 +1,7 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Linq;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
@ -91,14 +92,14 @@ namespace osu.Game.Overlays.FirstRunSetup
private void applyClassic()
{
foreach (var i in searchContainer.ChildrenOfType<ISettingsItem>())
i.ApplyClassicDefault(true);
foreach (var i in searchContainer.ChildrenOfType<ISettingsItem>().Where(s => s.HasClassicDefault))
i.ApplyClassicDefault();
}
private void applyStandard()
{
foreach (var i in searchContainer.ChildrenOfType<ISettingsItem>())
i.ApplyClassicDefault(false);
foreach (var i in searchContainer.ChildrenOfType<ISettingsItem>().Where(s => s.HasClassicDefault))
i.ApplyDefault();
}
}
}