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