2021-02-02 19:58:31 +08:00
|
|
|
// 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.
|
|
|
|
|
2021-02-02 20:06:32 +08:00
|
|
|
using osu.Game.Rulesets.Mods;
|
|
|
|
|
2021-02-02 19:58:31 +08:00
|
|
|
namespace osu.Game.Overlays.Mods
|
|
|
|
{
|
2021-09-01 16:22:52 +08:00
|
|
|
public class UserModSelectOverlay : ModSelectOverlay
|
2021-02-02 19:58:31 +08:00
|
|
|
{
|
2021-02-02 20:06:32 +08:00
|
|
|
protected override void OnModSelected(Mod mod)
|
|
|
|
{
|
|
|
|
base.OnModSelected(mod);
|
|
|
|
|
|
|
|
foreach (var section in ModSectionsContainer.Children)
|
2021-06-18 12:17:55 +08:00
|
|
|
section.DeselectTypes(mod.IncompatibleMods, true, mod);
|
2021-02-02 20:06:32 +08:00
|
|
|
}
|
2021-08-28 07:37:46 +08:00
|
|
|
|
2021-09-01 16:22:52 +08:00
|
|
|
protected override ModSection CreateModSection(ModType type) => new UserModSection(type);
|
2021-08-28 07:37:46 +08:00
|
|
|
|
2021-09-01 16:22:52 +08:00
|
|
|
private class UserModSection : ModSection
|
2021-08-28 07:37:46 +08:00
|
|
|
{
|
2021-09-01 16:22:52 +08:00
|
|
|
public UserModSection(ModType type)
|
2021-08-28 07:37:46 +08:00
|
|
|
: base(type)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2021-09-01 16:19:38 +08:00
|
|
|
protected override ModButton CreateModButton(Mod mod) => new IncompatibilityDisplayingModButton(mod);
|
2021-08-28 07:37:46 +08:00
|
|
|
}
|
2021-02-02 19:58:31 +08:00
|
|
|
}
|
|
|
|
}
|