mirror of
https://github.com/ppy/osu
synced 2024-12-26 17:02:59 +00:00
Add replacements for mod overlays used by game
This commit is contained in:
parent
67c44db8d5
commit
7eebc20124
24
osu.Game/Overlays/Mods/UserModSelectScreen.cs
Normal file
24
osu.Game/Overlays/Mods/UserModSelectScreen.cs
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
// 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 JetBrains.Annotations;
|
||||||
|
using osu.Game.Rulesets.Mods;
|
||||||
|
using osuTK.Input;
|
||||||
|
|
||||||
|
namespace osu.Game.Overlays.Mods
|
||||||
|
{
|
||||||
|
public class UserModSelectScreen : ModSelectScreen
|
||||||
|
{
|
||||||
|
protected override ModColumn CreateModColumn(ModType modType, Key[] toggleKeys = null) => new UserModColumn(modType, false, toggleKeys);
|
||||||
|
|
||||||
|
private class UserModColumn : ModColumn
|
||||||
|
{
|
||||||
|
public UserModColumn(ModType modType, bool allowBulkSelection, [CanBeNull] Key[] toggleKeys = null)
|
||||||
|
: base(modType, allowBulkSelection, toggleKeys)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override ModPanel CreateModPanel(Mod mod) => new IncompatibilityDisplayingModPanel(mod);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
29
osu.Game/Screens/OnlinePlay/FreeModSelectScreen.cs
Normal file
29
osu.Game/Screens/OnlinePlay/FreeModSelectScreen.cs
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
// 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;
|
||||||
|
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 AllowConfiguration => false;
|
||||||
|
protected override bool ShowTotalMultiplier => false;
|
||||||
|
|
||||||
|
public new Func<Mod, bool> IsValidMod
|
||||||
|
{
|
||||||
|
get => base.IsValidMod;
|
||||||
|
set => base.IsValidMod = m => m.HasImplementation && m.UserPlayable && value.Invoke(m);
|
||||||
|
}
|
||||||
|
|
||||||
|
public FreeModSelectScreen()
|
||||||
|
{
|
||||||
|
IsValidMod = _ => true;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override ModColumn CreateModColumn(ModType modType, Key[] toggleKeys = null) => new ModColumn(modType, true, toggleKeys);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user