2022-03-27 23:07:52 +02: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-04 22:17:40 +02:00
|
|
|
using osu.Game.Overlays;
|
2022-05-06 22:36:08 +02:00
|
|
|
using System.Collections.Generic;
|
2022-05-15 03:16:33 +09:00
|
|
|
using System.Linq;
|
2022-05-06 16:31:59 +02:00
|
|
|
using osu.Framework.Graphics;
|
|
|
|
using osu.Game.Graphics.UserInterface;
|
2022-03-27 23:07:52 +02:00
|
|
|
using osu.Game.Overlays.Mods;
|
|
|
|
using osu.Game.Rulesets.Mods;
|
|
|
|
|
|
|
|
namespace osu.Game.Screens.OnlinePlay
|
|
|
|
{
|
2022-05-25 22:18:30 +02:00
|
|
|
public partial class FreeModSelectOverlay : ModSelectOverlay
|
2022-03-27 23:07:52 +02:00
|
|
|
{
|
2023-09-11 09:55:45 +02:00
|
|
|
protected override bool ShowModEffects => false;
|
2022-03-27 23:07:52 +02:00
|
|
|
|
2022-05-15 03:16:33 +09:00
|
|
|
protected override bool AllowCustomisation => false;
|
|
|
|
|
2022-03-27 23:07:52 +02:00
|
|
|
public new Func<Mod, bool> IsValidMod
|
|
|
|
{
|
|
|
|
get => base.IsValidMod;
|
2022-04-17 22:16:59 +02:00
|
|
|
set => base.IsValidMod = m => m.UserPlayable && value.Invoke(m);
|
2022-03-27 23:07:52 +02:00
|
|
|
}
|
|
|
|
|
2022-05-10 22:29:57 +02:00
|
|
|
public FreeModSelectOverlay()
|
2022-05-04 22:17:40 +02:00
|
|
|
: base(OverlayColourScheme.Plum)
|
2022-03-27 23:07:52 +02:00
|
|
|
{
|
|
|
|
IsValidMod = _ => true;
|
|
|
|
}
|
|
|
|
|
2022-06-21 12:49:01 +02:00
|
|
|
protected override ModColumn CreateModColumn(ModType modType) => new ModColumn(modType, true);
|
2022-05-06 16:31:59 +02:00
|
|
|
|
2023-06-05 13:49:07 +03:00
|
|
|
protected override IEnumerable<ShearedButton> CreateFooterButtons()
|
|
|
|
=> base.CreateFooterButtons()
|
2023-06-19 01:02:16 +09:00
|
|
|
.Prepend(SelectAllModsButton = new SelectAllModsButton(this)
|
|
|
|
{
|
|
|
|
Anchor = Anchor.BottomLeft,
|
|
|
|
Origin = Anchor.BottomLeft,
|
|
|
|
});
|
2022-03-27 23:07:52 +02:00
|
|
|
}
|
|
|
|
}
|