1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-27 08:42:55 +08:00
osu-lazer/osu.Game/Screens/OnlinePlay/FreeModSelectOverlay.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

45 lines
1.3 KiB
C#
Raw Normal View History

// 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.
2022-06-17 15:37:17 +08:00
#nullable disable
using System;
using osu.Game.Overlays;
using System.Collections.Generic;
using System.Linq;
using osu.Framework.Graphics;
using osu.Game.Graphics.UserInterface;
using osu.Game.Overlays.Mods;
using osu.Game.Rulesets.Mods;
namespace osu.Game.Screens.OnlinePlay
{
public class FreeModSelectOverlay : ModSelectOverlay
{
protected override bool ShowTotalMultiplier => false;
protected override bool AllowCustomisation => false;
public new Func<Mod, bool> IsValidMod
{
get => base.IsValidMod;
set => base.IsValidMod = m => m.UserPlayable && value.Invoke(m);
}
public FreeModSelectOverlay()
: base(OverlayColourScheme.Plum)
{
IsValidMod = _ => true;
}
protected override ModColumn CreateModColumn(ModType modType) => new ModColumn(modType, true);
protected override IEnumerable<ShearedButton> CreateFooterButtons() => base.CreateFooterButtons().Prepend(
new SelectAllModsButton(this)
{
Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft,
});
}
}