mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 08:49:59 +09:00
ModSections in Ruleset, fixed toolbar play mode changed not firing
This commit is contained in:
@ -8,6 +8,8 @@ using osu.Game.Modes.Objects;
|
|||||||
using osu.Game.Modes.Osu.UI;
|
using osu.Game.Modes.Osu.UI;
|
||||||
using osu.Game.Modes.UI;
|
using osu.Game.Modes.UI;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
|
using osu.Game.Overlays.Mods;
|
||||||
|
using OpenTK.Input;
|
||||||
|
|
||||||
namespace osu.Game.Modes.Catch
|
namespace osu.Game.Modes.Catch
|
||||||
{
|
{
|
||||||
@ -31,6 +33,111 @@ namespace osu.Game.Modes.Catch
|
|||||||
new CatchModFlashlight(),
|
new CatchModFlashlight(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
public override IEnumerable<ModSection> CreateModSections() => new ModSection[]
|
||||||
|
{
|
||||||
|
new DifficultyReductionSection
|
||||||
|
{
|
||||||
|
Buttons = new[]
|
||||||
|
{
|
||||||
|
new ModButton
|
||||||
|
{
|
||||||
|
ToggleKey = Key.Q,
|
||||||
|
Mods = new Mod[]
|
||||||
|
{
|
||||||
|
new CatchModEasy(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
new ModButton
|
||||||
|
{
|
||||||
|
ToggleKey = Key.W,
|
||||||
|
Mods = new Mod[]
|
||||||
|
{
|
||||||
|
new CatchModNoFail(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
new ModButton
|
||||||
|
{
|
||||||
|
ToggleKey = Key.E,
|
||||||
|
Mods = new Mod[]
|
||||||
|
{
|
||||||
|
new CatchModHalfTime(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
new DifficultyIncreaseSection
|
||||||
|
{
|
||||||
|
Buttons = new ModButton[]
|
||||||
|
{
|
||||||
|
new ModButton
|
||||||
|
{
|
||||||
|
ToggleKey = Key.A,
|
||||||
|
Mods = new Mod[]
|
||||||
|
{
|
||||||
|
new CatchModHardRock(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
new ModButton
|
||||||
|
{
|
||||||
|
ToggleKey = Key.S,
|
||||||
|
Mods = new Mod[]
|
||||||
|
{
|
||||||
|
new CatchModSuddenDeath(),
|
||||||
|
new ModPerfect(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
new ModButton
|
||||||
|
{
|
||||||
|
ToggleKey = Key.D,
|
||||||
|
Mods = new Mod[]
|
||||||
|
{
|
||||||
|
new CatchModDoubleTime(),
|
||||||
|
new CatchModNightcore(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
new ModButton
|
||||||
|
{
|
||||||
|
ToggleKey = Key.F,
|
||||||
|
Mods = new Mod[]
|
||||||
|
{
|
||||||
|
new CatchModHidden(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
new ModButton
|
||||||
|
{
|
||||||
|
ToggleKey = Key.G,
|
||||||
|
Mods = new Mod[]
|
||||||
|
{
|
||||||
|
new CatchModFlashlight(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
new AssistedSection
|
||||||
|
{
|
||||||
|
Buttons = new[]
|
||||||
|
{
|
||||||
|
new ModButton
|
||||||
|
{
|
||||||
|
ToggleKey = Key.Z,
|
||||||
|
Mods = new Mod[]
|
||||||
|
{
|
||||||
|
new CatchModRelax(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
new ModButton
|
||||||
|
{
|
||||||
|
ToggleKey = Key.B,
|
||||||
|
Mods = new Mod[]
|
||||||
|
{
|
||||||
|
new ModAutoplay(),
|
||||||
|
new ModCinema(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
protected override PlayMode PlayMode => PlayMode.Catch;
|
protected override PlayMode PlayMode => PlayMode.Catch;
|
||||||
|
|
||||||
public override FontAwesome Icon => FontAwesome.fa_osu_fruits_o;
|
public override FontAwesome Icon => FontAwesome.fa_osu_fruits_o;
|
||||||
|
@ -8,6 +8,8 @@ using osu.Game.Modes.Objects;
|
|||||||
using osu.Game.Modes.Osu.UI;
|
using osu.Game.Modes.Osu.UI;
|
||||||
using osu.Game.Modes.UI;
|
using osu.Game.Modes.UI;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
|
using osu.Game.Overlays.Mods;
|
||||||
|
using OpenTK.Input;
|
||||||
|
|
||||||
namespace osu.Game.Modes.Mania
|
namespace osu.Game.Modes.Mania
|
||||||
{
|
{
|
||||||
@ -42,6 +44,135 @@ namespace osu.Game.Modes.Mania
|
|||||||
new ManiaModKeyCoop(),
|
new ManiaModKeyCoop(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
public override IEnumerable<ModSection> CreateModSections() => new ModSection[]
|
||||||
|
{
|
||||||
|
new DifficultyReductionSection
|
||||||
|
{
|
||||||
|
Buttons = new[]
|
||||||
|
{
|
||||||
|
new ModButton
|
||||||
|
{
|
||||||
|
ToggleKey = Key.Q,
|
||||||
|
Mods = new Mod[]
|
||||||
|
{
|
||||||
|
new ManiaModEasy(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
new ModButton
|
||||||
|
{
|
||||||
|
ToggleKey = Key.W,
|
||||||
|
Mods = new Mod[]
|
||||||
|
{
|
||||||
|
new ManiaModNoFail(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
new ModButton
|
||||||
|
{
|
||||||
|
ToggleKey = Key.E,
|
||||||
|
Mods = new Mod[]
|
||||||
|
{
|
||||||
|
new ManiaModHalfTime(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
new DifficultyIncreaseSection
|
||||||
|
{
|
||||||
|
Buttons = new ModButton[]
|
||||||
|
{
|
||||||
|
new ModButton
|
||||||
|
{
|
||||||
|
ToggleKey = Key.A,
|
||||||
|
Mods = new Mod[]
|
||||||
|
{
|
||||||
|
new ManiaModHardRock(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
new ModButton
|
||||||
|
{
|
||||||
|
ToggleKey = Key.S,
|
||||||
|
Mods = new Mod[]
|
||||||
|
{
|
||||||
|
new ManiaModSuddenDeath(),
|
||||||
|
new ModPerfect(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
new ModButton
|
||||||
|
{
|
||||||
|
ToggleKey = Key.D,
|
||||||
|
Mods = new Mod[]
|
||||||
|
{
|
||||||
|
new ManiaModDoubleTime(),
|
||||||
|
new ManiaModNightcore(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
new ModButton
|
||||||
|
{
|
||||||
|
ToggleKey = Key.F,
|
||||||
|
Mods = new Mod[]
|
||||||
|
{
|
||||||
|
new ManiaModHidden(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
new ModButton
|
||||||
|
{
|
||||||
|
ToggleKey = Key.G,
|
||||||
|
Mods = new Mod[]
|
||||||
|
{
|
||||||
|
new ManiaModFlashlight(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
new AssistedSection
|
||||||
|
{
|
||||||
|
Buttons = new[]
|
||||||
|
{
|
||||||
|
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(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
new ModButton
|
||||||
|
{
|
||||||
|
ToggleKey = Key.X,
|
||||||
|
Mods = new Mod[]
|
||||||
|
{
|
||||||
|
new ManiaModKeyCoop(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
new ModButton
|
||||||
|
{
|
||||||
|
ToggleKey = Key.C,
|
||||||
|
Mods = new Mod[]
|
||||||
|
{
|
||||||
|
new ManiaModRandom(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
new ModButton
|
||||||
|
{
|
||||||
|
ToggleKey = Key.V,
|
||||||
|
Mods = new Mod[]
|
||||||
|
{
|
||||||
|
new ModAutoplay(),
|
||||||
|
new ModCinema(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
protected override PlayMode PlayMode => PlayMode.Mania;
|
protected override PlayMode PlayMode => PlayMode.Mania;
|
||||||
|
|
||||||
public override FontAwesome Icon => FontAwesome.fa_osu_mania_o;
|
public override FontAwesome Icon => FontAwesome.fa_osu_mania_o;
|
||||||
|
@ -3,12 +3,14 @@
|
|||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using OpenTK.Input;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Modes.Objects;
|
using osu.Game.Modes.Objects;
|
||||||
using osu.Game.Modes.Osu.Objects;
|
using osu.Game.Modes.Osu.Objects;
|
||||||
using osu.Game.Modes.Osu.UI;
|
using osu.Game.Modes.Osu.UI;
|
||||||
using osu.Game.Modes.UI;
|
using osu.Game.Modes.UI;
|
||||||
|
using osu.Game.Overlays.Mods;
|
||||||
|
|
||||||
namespace osu.Game.Modes.Osu
|
namespace osu.Game.Modes.Osu
|
||||||
{
|
{
|
||||||
@ -51,6 +53,135 @@ namespace osu.Game.Modes.Osu
|
|||||||
new OsuModTarget(),
|
new OsuModTarget(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
public override IEnumerable<ModSection> CreateModSections() => new ModSection[]
|
||||||
|
{
|
||||||
|
new DifficultyReductionSection
|
||||||
|
{
|
||||||
|
Buttons = new[]
|
||||||
|
{
|
||||||
|
new ModButton
|
||||||
|
{
|
||||||
|
ToggleKey = Key.Q,
|
||||||
|
Mods = new Mod[]
|
||||||
|
{
|
||||||
|
new OsuModEasy(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
new ModButton
|
||||||
|
{
|
||||||
|
ToggleKey = Key.W,
|
||||||
|
Mods = new Mod[]
|
||||||
|
{
|
||||||
|
new OsuModNoFail(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
new ModButton
|
||||||
|
{
|
||||||
|
ToggleKey = Key.E,
|
||||||
|
Mods = new Mod[]
|
||||||
|
{
|
||||||
|
new OsuModHalfTime(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
new DifficultyIncreaseSection
|
||||||
|
{
|
||||||
|
Buttons = new ModButton[]
|
||||||
|
{
|
||||||
|
new ModButton
|
||||||
|
{
|
||||||
|
ToggleKey = Key.A,
|
||||||
|
Mods = new Mod[]
|
||||||
|
{
|
||||||
|
new OsuModHardRock(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
new ModButton
|
||||||
|
{
|
||||||
|
ToggleKey = Key.S,
|
||||||
|
Mods = new Mod[]
|
||||||
|
{
|
||||||
|
new OsuModSuddenDeath(),
|
||||||
|
new ModPerfect(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
new ModButton
|
||||||
|
{
|
||||||
|
ToggleKey = Key.D,
|
||||||
|
Mods = new Mod[]
|
||||||
|
{
|
||||||
|
new OsuModDoubleTime(),
|
||||||
|
new OsuModNightcore(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
new ModButton
|
||||||
|
{
|
||||||
|
ToggleKey = Key.F,
|
||||||
|
Mods = new Mod[]
|
||||||
|
{
|
||||||
|
new OsuModHidden(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
new ModButton
|
||||||
|
{
|
||||||
|
ToggleKey = Key.G,
|
||||||
|
Mods = new Mod[]
|
||||||
|
{
|
||||||
|
new OsuModFlashlight(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
new AssistedSection
|
||||||
|
{
|
||||||
|
Buttons = new[]
|
||||||
|
{
|
||||||
|
new ModButton
|
||||||
|
{
|
||||||
|
ToggleKey = Key.Z,
|
||||||
|
Mods = new Mod[]
|
||||||
|
{
|
||||||
|
new OsuModRelax(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
new ModButton
|
||||||
|
{
|
||||||
|
ToggleKey = Key.X,
|
||||||
|
Mods = new Mod[]
|
||||||
|
{
|
||||||
|
new OsuModAutopilot(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
new ModButton
|
||||||
|
{
|
||||||
|
ToggleKey = Key.C,
|
||||||
|
Mods = new Mod[]
|
||||||
|
{
|
||||||
|
new OsuModTarget(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
new ModButton
|
||||||
|
{
|
||||||
|
ToggleKey = Key.V,
|
||||||
|
Mods = new Mod[]
|
||||||
|
{
|
||||||
|
new OsuModSpunOut(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
new ModButton
|
||||||
|
{
|
||||||
|
ToggleKey = Key.B,
|
||||||
|
Mods = new Mod[]
|
||||||
|
{
|
||||||
|
new ModAutoplay(),
|
||||||
|
new ModCinema(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
public override FontAwesome Icon => FontAwesome.fa_osu_osu_o;
|
public override FontAwesome Icon => FontAwesome.fa_osu_osu_o;
|
||||||
|
|
||||||
public override HitObjectParser CreateHitObjectParser() => new OsuHitObjectParser();
|
public override HitObjectParser CreateHitObjectParser() => new OsuHitObjectParser();
|
||||||
|
@ -8,6 +8,8 @@ using osu.Game.Modes.Osu.UI;
|
|||||||
using osu.Game.Modes.Taiko.UI;
|
using osu.Game.Modes.Taiko.UI;
|
||||||
using osu.Game.Modes.UI;
|
using osu.Game.Modes.UI;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
|
using osu.Game.Overlays.Mods;
|
||||||
|
using OpenTK.Input;
|
||||||
|
|
||||||
namespace osu.Game.Modes.Taiko
|
namespace osu.Game.Modes.Taiko
|
||||||
{
|
{
|
||||||
@ -31,6 +33,111 @@ namespace osu.Game.Modes.Taiko
|
|||||||
new TaikoModFlashlight(),
|
new TaikoModFlashlight(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
public override IEnumerable<ModSection> CreateModSections() => new ModSection[]
|
||||||
|
{
|
||||||
|
new DifficultyReductionSection
|
||||||
|
{
|
||||||
|
Buttons = new[]
|
||||||
|
{
|
||||||
|
new ModButton
|
||||||
|
{
|
||||||
|
ToggleKey = Key.Q,
|
||||||
|
Mods = new Mod[]
|
||||||
|
{
|
||||||
|
new TaikoModEasy(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
new ModButton
|
||||||
|
{
|
||||||
|
ToggleKey = Key.W,
|
||||||
|
Mods = new Mod[]
|
||||||
|
{
|
||||||
|
new TaikoModNoFail(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
new ModButton
|
||||||
|
{
|
||||||
|
ToggleKey = Key.E,
|
||||||
|
Mods = new Mod[]
|
||||||
|
{
|
||||||
|
new TaikoModHalfTime(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
new DifficultyIncreaseSection
|
||||||
|
{
|
||||||
|
Buttons = new ModButton[]
|
||||||
|
{
|
||||||
|
new ModButton
|
||||||
|
{
|
||||||
|
ToggleKey = Key.A,
|
||||||
|
Mods = new Mod[]
|
||||||
|
{
|
||||||
|
new TaikoModHardRock(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
new ModButton
|
||||||
|
{
|
||||||
|
ToggleKey = Key.S,
|
||||||
|
Mods = new Mod[]
|
||||||
|
{
|
||||||
|
new TaikoModSuddenDeath(),
|
||||||
|
new ModPerfect(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
new ModButton
|
||||||
|
{
|
||||||
|
ToggleKey = Key.D,
|
||||||
|
Mods = new Mod[]
|
||||||
|
{
|
||||||
|
new TaikoModDoubleTime(),
|
||||||
|
new TaikoModNightcore(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
new ModButton
|
||||||
|
{
|
||||||
|
ToggleKey = Key.F,
|
||||||
|
Mods = new Mod[]
|
||||||
|
{
|
||||||
|
new TaikoModHidden(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
new ModButton
|
||||||
|
{
|
||||||
|
ToggleKey = Key.G,
|
||||||
|
Mods = new Mod[]
|
||||||
|
{
|
||||||
|
new TaikoModFlashlight(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
new AssistedSection
|
||||||
|
{
|
||||||
|
Buttons = new[]
|
||||||
|
{
|
||||||
|
new ModButton
|
||||||
|
{
|
||||||
|
ToggleKey = Key.Z,
|
||||||
|
Mods = new Mod[]
|
||||||
|
{
|
||||||
|
new TaikoModRelax(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
new ModButton
|
||||||
|
{
|
||||||
|
ToggleKey = Key.B,
|
||||||
|
Mods = new Mod[]
|
||||||
|
{
|
||||||
|
new ModAutoplay(),
|
||||||
|
new ModCinema(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
protected override PlayMode PlayMode => PlayMode.Taiko;
|
protected override PlayMode PlayMode => PlayMode.Taiko;
|
||||||
|
|
||||||
public override FontAwesome Icon => FontAwesome.fa_osu_taiko_o;
|
public override FontAwesome Icon => FontAwesome.fa_osu_taiko_o;
|
||||||
|
@ -8,6 +8,7 @@ using System;
|
|||||||
using System.Collections.Concurrent;
|
using System.Collections.Concurrent;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
|
using osu.Game.Overlays.Mods;
|
||||||
|
|
||||||
namespace osu.Game.Modes
|
namespace osu.Game.Modes
|
||||||
{
|
{
|
||||||
@ -28,6 +29,8 @@ namespace osu.Game.Modes
|
|||||||
|
|
||||||
public abstract IEnumerable<Mod> AvailableMods { get; }
|
public abstract IEnumerable<Mod> AvailableMods { get; }
|
||||||
|
|
||||||
|
public abstract IEnumerable<ModSection> CreateModSections();
|
||||||
|
|
||||||
public abstract ScoreProcessor CreateScoreProcessor(int hitObjectCount);
|
public abstract ScoreProcessor CreateScoreProcessor(int hitObjectCount);
|
||||||
|
|
||||||
public abstract HitRenderer CreateHitRendererWith(Beatmap beatmap);
|
public abstract HitRenderer CreateHitRendererWith(Beatmap beatmap);
|
||||||
|
@ -12,16 +12,6 @@ namespace osu.Game
|
|||||||
{
|
{
|
||||||
public class AssistedSection : ModSection
|
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]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OsuColour colours)
|
||||||
{
|
{
|
||||||
@ -29,132 +19,9 @@ namespace osu.Game
|
|||||||
SelectedColour = colours.BlueLight;
|
SelectedColour = colours.BlueLight;
|
||||||
}
|
}
|
||||||
|
|
||||||
public AssistedSection(PlayMode mode)
|
public AssistedSection()
|
||||||
{
|
{
|
||||||
Header = @"Assisted";
|
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 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]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OsuColour colours)
|
||||||
{
|
{
|
||||||
@ -27,51 +21,6 @@ namespace osu.Game
|
|||||||
public DifficultyIncreaseSection()
|
public DifficultyIncreaseSection()
|
||||||
{
|
{
|
||||||
Header = @"Gameplay Difficulty Increase";
|
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 class DifficultyReductionSection : ModSection
|
||||||
{
|
{
|
||||||
public ModButton EasyButton => Buttons[0];
|
|
||||||
public ModButton NoFailButton => Buttons[1];
|
|
||||||
public ModButton HalfTimeButton => Buttons[2];
|
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OsuColour colours)
|
||||||
{
|
{
|
||||||
@ -25,33 +21,6 @@ namespace osu.Game
|
|||||||
public DifficultyReductionSection()
|
public DifficultyReductionSection()
|
||||||
{
|
{
|
||||||
Header = @"Gameplay Difficulty Reduction";
|
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.Graphics.Sprites;
|
||||||
using osu.Game.Modes;
|
using osu.Game.Modes;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Input;
|
|
||||||
using OpenTK.Input;
|
|
||||||
using System.Linq;
|
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Mods
|
namespace osu.Game.Overlays.Mods
|
||||||
{
|
{
|
||||||
@ -45,33 +42,18 @@ namespace osu.Game.Overlays.Mods
|
|||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (value == modMode) return;
|
|
||||||
modMode = value;
|
modMode = value;
|
||||||
|
|
||||||
modSectionsContainer.Children = new ModSection[]
|
modSectionsContainer.RemoveAll(delegate (ModSection m) { return true; });
|
||||||
|
foreach (ModSection s in Ruleset.GetRuleset(value).CreateModSections())
|
||||||
{
|
{
|
||||||
new DifficultyReductionSection
|
s.RelativeSizeAxes = Axes.X;
|
||||||
{
|
s.Origin = Anchor.TopCentre;
|
||||||
RelativeSizeAxes = Axes.X,
|
s.Anchor = Anchor.TopCentre;
|
||||||
Origin = Anchor.TopCentre,
|
s.Action = modButtonPressed;
|
||||||
Anchor = Anchor.TopCentre,
|
|
||||||
Action = modButtonPressed,
|
modSectionsContainer.Add(s);
|
||||||
},
|
}
|
||||||
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,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -312,30 +294,6 @@ namespace osu.Game.Overlays.Mods
|
|||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
Spacing = new Vector2(0f, 10f),
|
Spacing = new Vector2(0f, 10f),
|
||||||
Width = content_width,
|
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
|
// Footer
|
||||||
new Container
|
new Container
|
||||||
|
@ -55,7 +55,10 @@ namespace osu.Game.Overlays.Toolbar
|
|||||||
},
|
},
|
||||||
modeSelector = new ToolbarModeSelector
|
modeSelector = new ToolbarModeSelector
|
||||||
{
|
{
|
||||||
OnPlayModeChange = OnPlayModeChange
|
OnPlayModeChange = (PlayMode mode) =>
|
||||||
|
{
|
||||||
|
OnPlayModeChange?.Invoke(mode);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -145,12 +145,8 @@ namespace osu.Game.Screens.Select
|
|||||||
if (osuGame != null)
|
if (osuGame != null)
|
||||||
{
|
{
|
||||||
playMode = osuGame.PlayMode;
|
playMode = osuGame.PlayMode;
|
||||||
playMode.ValueChanged += playMode_ValueChanged;
|
|
||||||
modSelect.ModMode = playMode;
|
modSelect.ModMode = playMode;
|
||||||
}
|
playMode.ValueChanged += playMode_ValueChanged;
|
||||||
else
|
|
||||||
{
|
|
||||||
modSelect.ModMode = PlayMode.Osu;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (database == null)
|
if (database == null)
|
||||||
|
Reference in New Issue
Block a user