mirror of
https://github.com/ppy/osu
synced 2024-12-25 08:12:41 +00:00
Merge pull request #459 from Jorolf/rulesetAndPlayModeRemake
Added Descriptions to Rulesets + PlayModes list
This commit is contained in:
commit
9e223bd77b
@ -79,6 +79,8 @@ namespace osu.Game.Modes.Catch
|
||||
|
||||
protected override PlayMode PlayMode => PlayMode.Catch;
|
||||
|
||||
public override string Description => "osu!catch";
|
||||
|
||||
public override FontAwesome Icon => FontAwesome.fa_osu_fruits_o;
|
||||
|
||||
public override ScoreProcessor CreateScoreProcessor(int hitObjectCount = 0) => null;
|
||||
|
@ -100,6 +100,8 @@ namespace osu.Game.Modes.Mania
|
||||
|
||||
protected override PlayMode PlayMode => PlayMode.Mania;
|
||||
|
||||
public override string Description => "osu!mania";
|
||||
|
||||
public override FontAwesome Icon => FontAwesome.fa_osu_mania_o;
|
||||
|
||||
public override ScoreProcessor CreateScoreProcessor(int hitObjectCount = 0) => null;
|
||||
|
@ -111,5 +111,7 @@ namespace osu.Game.Modes.Osu
|
||||
}
|
||||
|
||||
protected override PlayMode PlayMode => PlayMode.Osu;
|
||||
|
||||
public override string Description => "osu!";
|
||||
}
|
||||
}
|
||||
|
@ -79,6 +79,8 @@ namespace osu.Game.Modes.Taiko
|
||||
|
||||
protected override PlayMode PlayMode => PlayMode.Taiko;
|
||||
|
||||
public override string Description => "osu!taiko";
|
||||
|
||||
public override FontAwesome Icon => FontAwesome.fa_osu_taiko_o;
|
||||
|
||||
public override ScoreProcessor CreateScoreProcessor(int hitObjectCount = 0) => null;
|
||||
|
@ -1,19 +1,13 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace osu.Game.Modes
|
||||
{
|
||||
public enum PlayMode
|
||||
{
|
||||
[Description(@"osu!")]
|
||||
Osu = 0,
|
||||
[Description(@"osu!taiko")]
|
||||
Taiko = 1,
|
||||
[Description(@"osu!catch")]
|
||||
Catch = 2,
|
||||
[Description(@"osu!mania")]
|
||||
Mania = 3
|
||||
}
|
||||
}
|
||||
|
@ -22,6 +22,8 @@ namespace osu.Game.Modes
|
||||
{
|
||||
private static ConcurrentDictionary<PlayMode, Type> availableRulesets = new ConcurrentDictionary<PlayMode, Type>();
|
||||
|
||||
public static IEnumerable<PlayMode> PlayModes => availableRulesets.Keys;
|
||||
|
||||
public abstract ScoreOverlay CreateScoreOverlay();
|
||||
|
||||
public virtual IEnumerable<BeatmapStatistic> GetBeatmapStatistics(WorkingBeatmap beatmap) => new BeatmapStatistic[] { };
|
||||
@ -42,6 +44,8 @@ namespace osu.Game.Modes
|
||||
|
||||
public virtual FontAwesome Icon => FontAwesome.fa_question_circle;
|
||||
|
||||
public abstract string Description { get; }
|
||||
|
||||
public virtual Score CreateAutoplayScore(Beatmap beatmap) => null;
|
||||
|
||||
public static Ruleset GetRuleset(PlayMode mode)
|
||||
|
@ -1,7 +1,6 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Framework.Extensions;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Modes;
|
||||
using OpenTK.Graphics;
|
||||
@ -17,8 +16,8 @@ namespace osu.Game.Overlays.Toolbar
|
||||
set
|
||||
{
|
||||
mode = value;
|
||||
TooltipMain = mode.GetDescription();
|
||||
TooltipSub = $"Play some {mode.GetDescription()}";
|
||||
TooltipMain = Ruleset.GetRuleset(mode).Description;
|
||||
TooltipSub = $"Play some {Ruleset.GetRuleset(mode).Description}";
|
||||
Icon = Ruleset.GetRuleset(mode).Icon;
|
||||
}
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ namespace osu.Game.Overlays.Toolbar
|
||||
}
|
||||
};
|
||||
|
||||
foreach (PlayMode m in Enum.GetValues(typeof(PlayMode)))
|
||||
foreach (PlayMode m in Ruleset.PlayModes)
|
||||
{
|
||||
var localMode = m;
|
||||
modeButtons.Add(new ToolbarModeButton
|
||||
|
Loading…
Reference in New Issue
Block a user