2022-03-28 05:07:52 +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.
|
|
|
|
|
|
|
|
using System;
|
2022-05-06 22:31:59 +08:00
|
|
|
using osu.Framework.Graphics;
|
|
|
|
using osu.Game.Graphics.UserInterface;
|
2022-03-28 05:07:52 +08:00
|
|
|
using osu.Game.Overlays.Mods;
|
|
|
|
using osu.Game.Rulesets.Mods;
|
|
|
|
using osuTK.Input;
|
|
|
|
|
|
|
|
namespace osu.Game.Screens.OnlinePlay
|
|
|
|
{
|
|
|
|
public class FreeModSelectScreen : ModSelectScreen
|
|
|
|
{
|
|
|
|
protected override bool ShowTotalMultiplier => false;
|
|
|
|
|
|
|
|
public new Func<Mod, bool> IsValidMod
|
|
|
|
{
|
|
|
|
get => base.IsValidMod;
|
2022-04-18 04:16:59 +08:00
|
|
|
set => base.IsValidMod = m => m.UserPlayable && value.Invoke(m);
|
2022-03-28 05:07:52 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
public FreeModSelectScreen()
|
|
|
|
{
|
|
|
|
IsValidMod = _ => true;
|
|
|
|
}
|
|
|
|
|
|
|
|
protected override ModColumn CreateModColumn(ModType modType, Key[] toggleKeys = null) => new ModColumn(modType, true, toggleKeys);
|
2022-05-06 22:31:59 +08:00
|
|
|
|
|
|
|
protected override Drawable[] CreateFooterButtons() => new Drawable[]
|
|
|
|
{
|
|
|
|
new ShearedButton(200)
|
|
|
|
{
|
|
|
|
Anchor = Anchor.BottomLeft,
|
|
|
|
Origin = Anchor.BottomLeft,
|
|
|
|
Text = "Select All",
|
|
|
|
Action = SelectAll
|
|
|
|
},
|
|
|
|
new ShearedButton(200)
|
|
|
|
{
|
|
|
|
Anchor = Anchor.BottomLeft,
|
|
|
|
Origin = Anchor.BottomLeft,
|
|
|
|
Text = "Deselect All",
|
|
|
|
Action = DeselectAll
|
|
|
|
}
|
|
|
|
};
|
2022-03-28 05:07:52 +08:00
|
|
|
}
|
|
|
|
}
|