mirror of
https://github.com/osukey/osukey.git
synced 2025-06-28 22:58:10 +09:00
Make ModSelectOverlay abstract
This commit is contained in:
parent
50e92bd0ed
commit
e58ece9e10
@ -306,7 +306,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private class TestModSelectOverlay : ModSelectOverlay
|
private class TestModSelectOverlay : SoloModSelectOverlay
|
||||||
{
|
{
|
||||||
public new Bindable<IReadOnlyList<Mod>> SelectedMods => base.SelectedMods;
|
public new Bindable<IReadOnlyList<Mod>> SelectedMods => base.SelectedMods;
|
||||||
|
|
||||||
|
@ -151,7 +151,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
AddUntilStep("wait for ready", () => modSelect.State.Value == Visibility.Visible && modSelect.ButtonsLoaded);
|
AddUntilStep("wait for ready", () => modSelect.State.Value == Visibility.Visible && modSelect.ButtonsLoaded);
|
||||||
}
|
}
|
||||||
|
|
||||||
private class TestModSelectOverlay : ModSelectOverlay
|
private class TestModSelectOverlay : SoloModSelectOverlay
|
||||||
{
|
{
|
||||||
public new VisibilityContainer ModSettingsContainer => base.ModSettingsContainer;
|
public new VisibilityContainer ModSettingsContainer => base.ModSettingsContainer;
|
||||||
public new TriangleButton CustomiseButton => base.CustomiseButton;
|
public new TriangleButton CustomiseButton => base.CustomiseButton;
|
||||||
|
@ -30,7 +30,7 @@ using osuTK.Input;
|
|||||||
|
|
||||||
namespace osu.Game.Overlays.Mods
|
namespace osu.Game.Overlays.Mods
|
||||||
{
|
{
|
||||||
public class ModSelectOverlay : WaveOverlayContainer
|
public abstract class ModSelectOverlay : WaveOverlayContainer
|
||||||
{
|
{
|
||||||
public const float HEIGHT = 510;
|
public const float HEIGHT = 510;
|
||||||
|
|
||||||
@ -84,7 +84,7 @@ namespace osu.Game.Overlays.Mods
|
|||||||
|
|
||||||
private SampleChannel sampleOn, sampleOff;
|
private SampleChannel sampleOn, sampleOff;
|
||||||
|
|
||||||
public ModSelectOverlay()
|
protected ModSelectOverlay()
|
||||||
{
|
{
|
||||||
Waves.FirstWaveColour = Color4Extensions.FromHex(@"19b0e2");
|
Waves.FirstWaveColour = Color4Extensions.FromHex(@"19b0e2");
|
||||||
Waves.SecondWaveColour = Color4Extensions.FromHex(@"2280a2");
|
Waves.SecondWaveColour = Color4Extensions.FromHex(@"2280a2");
|
||||||
|
9
osu.Game/Overlays/Mods/SoloModSelectOverlay.cs
Normal file
9
osu.Game/Overlays/Mods/SoloModSelectOverlay.cs
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
// 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.
|
||||||
|
|
||||||
|
namespace osu.Game.Overlays.Mods
|
||||||
|
{
|
||||||
|
public class SoloModSelectOverlay : ModSelectOverlay
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
@ -111,7 +111,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
|||||||
|
|
||||||
protected override BeatmapDetailArea CreateBeatmapDetailArea() => new PlayBeatmapDetailArea();
|
protected override BeatmapDetailArea CreateBeatmapDetailArea() => new PlayBeatmapDetailArea();
|
||||||
|
|
||||||
protected override ModSelectOverlay CreateModSelectOverlay() => new ModSelectOverlay { IsValidMod = isValidMod };
|
protected override ModSelectOverlay CreateModSelectOverlay() => new SoloModSelectOverlay { IsValidMod = isValidMod };
|
||||||
|
|
||||||
private bool isValidMod(Mod mod) => !(mod is ModAutoplay) && (mod as MultiMod)?.Mods.Any(mm => mm is ModAutoplay) != true;
|
private bool isValidMod(Mod mod) => !(mod is ModAutoplay) && (mod as MultiMod)?.Mods.Any(mm => mm is ModAutoplay) != true;
|
||||||
}
|
}
|
||||||
|
@ -81,7 +81,7 @@ namespace osu.Game.Screens.Select
|
|||||||
item.RequiredMods.AddRange(Mods.Value.Select(m => m.CreateCopy()));
|
item.RequiredMods.AddRange(Mods.Value.Select(m => m.CreateCopy()));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override ModSelectOverlay CreateModSelectOverlay() => new ModSelectOverlay { IsValidMod = isValidMod };
|
protected override ModSelectOverlay CreateModSelectOverlay() => new SoloModSelectOverlay { IsValidMod = isValidMod };
|
||||||
|
|
||||||
private bool isValidMod(Mod mod) => !(mod is ModAutoplay) && (mod as MultiMod)?.Mods.Any(mm => mm is ModAutoplay) != true;
|
private bool isValidMod(Mod mod) => !(mod is ModAutoplay) && (mod as MultiMod)?.Mods.Any(mm => mm is ModAutoplay) != true;
|
||||||
}
|
}
|
||||||
|
@ -301,7 +301,7 @@ namespace osu.Game.Screens.Select
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual ModSelectOverlay CreateModSelectOverlay() => new ModSelectOverlay();
|
protected virtual ModSelectOverlay CreateModSelectOverlay() => new SoloModSelectOverlay();
|
||||||
|
|
||||||
protected virtual void ApplyFilterToCarousel(FilterCriteria criteria)
|
protected virtual void ApplyFilterToCarousel(FilterCriteria criteria)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user