mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 07:33:55 +09:00
ModSections in Ruleset, fixed toolbar play mode changed not firing
This commit is contained in:
@ -12,16 +12,6 @@ namespace osu.Game
|
||||
{
|
||||
public class AssistedSection : ModSection
|
||||
{
|
||||
public ModButton RelaxButton { get; private set; }
|
||||
public ModButton AutopilotButton { get; private set; }
|
||||
public ModButton TargetPracticeButton { get; private set; }
|
||||
public ModButton SpunOutButton { get; private set; }
|
||||
public ModButton AutoplayCinemaButton { get; private set; }
|
||||
|
||||
public ModButton KeyButton { get; private set; }
|
||||
public ModButton CoopButton { get; private set; }
|
||||
public ModButton RandomButton { get; private set; }
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
@ -29,132 +19,9 @@ namespace osu.Game
|
||||
SelectedColour = colours.BlueLight;
|
||||
}
|
||||
|
||||
public AssistedSection(PlayMode mode)
|
||||
public AssistedSection()
|
||||
{
|
||||
Header = @"Assisted";
|
||||
//switch (mode)
|
||||
//{
|
||||
// case PlayMode.Osu:
|
||||
// Buttons = new ModButton[]
|
||||
// {
|
||||
// RelaxButton = new ModButton
|
||||
// {
|
||||
// ToggleKey = Key.Z,
|
||||
// Mods = new Mod[]
|
||||
// {
|
||||
// new ModRelax(),
|
||||
// },
|
||||
// },
|
||||
// AutopilotButton = new ModButton
|
||||
// {
|
||||
// ToggleKey = Key.X,
|
||||
// Mods = new Mod[]
|
||||
// {
|
||||
// new OsuModAutopilot(),
|
||||
// },
|
||||
// },
|
||||
// TargetPracticeButton = new ModButton
|
||||
// {
|
||||
// ToggleKey = Key.C,
|
||||
// Mods = new Mod[]
|
||||
// {
|
||||
// new OsuModTarget(),
|
||||
// },
|
||||
// },
|
||||
// SpunOutButton = new ModButton
|
||||
// {
|
||||
// ToggleKey = Key.V,
|
||||
// Mods = new Mod[]
|
||||
// {
|
||||
// new OsuModSpunOut(),
|
||||
// },
|
||||
// },
|
||||
// AutoplayCinemaButton = new ModButton
|
||||
// {
|
||||
// ToggleKey = Key.B,
|
||||
// Mods = new Mod[]
|
||||
// {
|
||||
// new ModAutoplay(),
|
||||
// new ModCinema(),
|
||||
// },
|
||||
// },
|
||||
// };
|
||||
// break;
|
||||
|
||||
// case PlayMode.Taiko:
|
||||
// case PlayMode.Catch:
|
||||
// Buttons = new ModButton[]
|
||||
// {
|
||||
// RelaxButton = new ModButton
|
||||
// {
|
||||
// ToggleKey = Key.Z,
|
||||
// Mods = new Mod[]
|
||||
// {
|
||||
// new ModRelax(),
|
||||
// },
|
||||
// },
|
||||
// AutoplayCinemaButton = new ModButton
|
||||
// {
|
||||
// ToggleKey = Key.X,
|
||||
// Mods = new Mod[]
|
||||
// {
|
||||
// new ModAutoplay(),
|
||||
// new ModCinema(),
|
||||
// },
|
||||
// },
|
||||
// };
|
||||
// break;
|
||||
|
||||
// case PlayMode.Mania:
|
||||
// Buttons = new ModButton[]
|
||||
// {
|
||||
// KeyButton = new ModButton
|
||||
// {
|
||||
// ToggleKey = Key.Z,
|
||||
// Mods = new Mod[]
|
||||
// {
|
||||
// new ManiaModKey4(),
|
||||
// new ManiaModKey5(),
|
||||
// new ManiaModKey6(),
|
||||
// new ManiaModKey7(),
|
||||
// new ManiaModKey8(),
|
||||
// new ManiaModKey9(),
|
||||
// new ManiaModKey1(),
|
||||
// new ManiaModKey2(),
|
||||
// new ManiaModKey3(),
|
||||
// },
|
||||
// },
|
||||
// CoopButton = new ModButton
|
||||
// {
|
||||
// ToggleKey = Key.X,
|
||||
// Mods = new Mod[]
|
||||
// {
|
||||
// new ManiaModKeyCoop(),
|
||||
// },
|
||||
// },
|
||||
// RandomButton = new ModButton
|
||||
// {
|
||||
// ToggleKey = Key.C,
|
||||
// Mods = new Mod[]
|
||||
// {
|
||||
// new ManiaModRandom(),
|
||||
// },
|
||||
// },
|
||||
// AutoplayCinemaButton = new ModButton
|
||||
// {
|
||||
// ToggleKey = Key.V,
|
||||
// Mods = new Mod[]
|
||||
// {
|
||||
// new ModAutoplay(),
|
||||
// new ModCinema(),
|
||||
// },
|
||||
// },
|
||||
// };
|
||||
// break;
|
||||
|
||||
// default:
|
||||
// throw new NotSupportedException();
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -11,12 +11,6 @@ namespace osu.Game
|
||||
{
|
||||
public class DifficultyIncreaseSection : ModSection
|
||||
{
|
||||
public ModButton HardRockButton => Buttons[0];
|
||||
public ModButton SuddenDeathButton => Buttons[1];
|
||||
public ModButton DoubleTimeNightcoreButton => Buttons[2];
|
||||
public ModButton HiddenButton => Buttons[3];
|
||||
public ModButton FlashlightButton => Buttons[4];
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
@ -27,51 +21,6 @@ namespace osu.Game
|
||||
public DifficultyIncreaseSection()
|
||||
{
|
||||
Header = @"Gameplay Difficulty Increase";
|
||||
//Buttons = new ModButton[]
|
||||
//{
|
||||
// new ModButton
|
||||
// {
|
||||
// ToggleKey = Key.A,
|
||||
// Mods = new Mod[]
|
||||
// {
|
||||
// new ModHardRock(),
|
||||
// },
|
||||
// },
|
||||
// new ModButton
|
||||
// {
|
||||
// ToggleKey = Key.S,
|
||||
// Mods = new Mod[]
|
||||
// {
|
||||
// new ModSuddenDeath(),
|
||||
// new ModPerfect(),
|
||||
// },
|
||||
// },
|
||||
// new ModButton
|
||||
// {
|
||||
// ToggleKey = Key.D,
|
||||
// Mods = new Mod[]
|
||||
// {
|
||||
// new ModDoubleTime(),
|
||||
// new ModNightcore(),
|
||||
// },
|
||||
// },
|
||||
// new ModButton
|
||||
// {
|
||||
// ToggleKey = Key.F,
|
||||
// Mods = new Mod[]
|
||||
// {
|
||||
// new ModHidden(),
|
||||
// },
|
||||
// },
|
||||
// new ModButton
|
||||
// {
|
||||
// ToggleKey = Key.G,
|
||||
// Mods = new Mod[]
|
||||
// {
|
||||
// new ModFlashlight(),
|
||||
// },
|
||||
// },
|
||||
//};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -11,10 +11,6 @@ namespace osu.Game
|
||||
{
|
||||
public class DifficultyReductionSection : ModSection
|
||||
{
|
||||
public ModButton EasyButton => Buttons[0];
|
||||
public ModButton NoFailButton => Buttons[1];
|
||||
public ModButton HalfTimeButton => Buttons[2];
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
@ -25,33 +21,6 @@ namespace osu.Game
|
||||
public DifficultyReductionSection()
|
||||
{
|
||||
Header = @"Gameplay Difficulty Reduction";
|
||||
//Buttons = new ModButton[]
|
||||
//{
|
||||
// new ModButton
|
||||
// {
|
||||
// ToggleKey = Key.Q,
|
||||
// Mods = new Mod[]
|
||||
// {
|
||||
// new ModEasy(),
|
||||
// },
|
||||
// },
|
||||
// new ModButton
|
||||
// {
|
||||
// ToggleKey = Key.W,
|
||||
// Mods = new Mod[]
|
||||
// {
|
||||
// new ModNoFail(),
|
||||
// },
|
||||
// },
|
||||
// new ModButton
|
||||
// {
|
||||
// ToggleKey = Key.E,
|
||||
// Mods = new Mod[]
|
||||
// {
|
||||
// new ModHalfTime(),
|
||||
// },
|
||||
// },
|
||||
//};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -15,9 +15,6 @@ using osu.Game.Graphics.Backgrounds;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Modes;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Input;
|
||||
using OpenTK.Input;
|
||||
using System.Linq;
|
||||
|
||||
namespace osu.Game.Overlays.Mods
|
||||
{
|
||||
@ -45,33 +42,18 @@ namespace osu.Game.Overlays.Mods
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value == modMode) return;
|
||||
modMode = value;
|
||||
|
||||
modSectionsContainer.Children = new ModSection[]
|
||||
modSectionsContainer.RemoveAll(delegate (ModSection m) { return true; });
|
||||
foreach (ModSection s in Ruleset.GetRuleset(value).CreateModSections())
|
||||
{
|
||||
new DifficultyReductionSection
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Origin = Anchor.TopCentre,
|
||||
Anchor = Anchor.TopCentre,
|
||||
Action = modButtonPressed,
|
||||
},
|
||||
new DifficultyIncreaseSection
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Origin = Anchor.TopCentre,
|
||||
Anchor = Anchor.TopCentre,
|
||||
Action = modButtonPressed,
|
||||
},
|
||||
new AssistedSection(value)
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Origin = Anchor.TopCentre,
|
||||
Anchor = Anchor.TopCentre,
|
||||
Action = modButtonPressed,
|
||||
},
|
||||
};
|
||||
s.RelativeSizeAxes = Axes.X;
|
||||
s.Origin = Anchor.TopCentre;
|
||||
s.Anchor = Anchor.TopCentre;
|
||||
s.Action = modButtonPressed;
|
||||
|
||||
modSectionsContainer.Add(s);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -312,30 +294,6 @@ namespace osu.Game.Overlays.Mods
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Spacing = new Vector2(0f, 10f),
|
||||
Width = content_width,
|
||||
Children = new ModSection[]
|
||||
{
|
||||
new DifficultyReductionSection
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Origin = Anchor.TopCentre,
|
||||
Anchor = Anchor.TopCentre,
|
||||
Action = modButtonPressed,
|
||||
},
|
||||
new DifficultyIncreaseSection
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Origin = Anchor.TopCentre,
|
||||
Anchor = Anchor.TopCentre,
|
||||
Action = modButtonPressed,
|
||||
},
|
||||
new AssistedSection(PlayMode.Osu)
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Origin = Anchor.TopCentre,
|
||||
Anchor = Anchor.TopCentre,
|
||||
Action = modButtonPressed,
|
||||
},
|
||||
},
|
||||
},
|
||||
// Footer
|
||||
new Container
|
||||
|
Reference in New Issue
Block a user