mirror of
https://github.com/ppy/osu.git
synced 2025-03-15 23:57:25 +08:00
Merge pull request #2314 from Joehuu/score-multiplier-edits
Split score multiplier and unranked label colours
This commit is contained in:
commit
db89b92ae2
@ -1 +1 @@
|
|||||||
Subproject commit 84fdfc77a86d581638e69f5e8061c118de4b30f9
|
Subproject commit aebfa5bc5c634c1fd0c103e0c17518e5111a67c7
|
@ -16,7 +16,7 @@ namespace osu.Game.Rulesets.Mania.Mods
|
|||||||
public override string Name => "Dual Stages";
|
public override string Name => "Dual Stages";
|
||||||
public override string ShortenedName => "DS";
|
public override string ShortenedName => "DS";
|
||||||
public override string Description => @"Double the stages, double the fun!";
|
public override string Description => @"Double the stages, double the fun!";
|
||||||
public override double ScoreMultiplier => 0;
|
public override double ScoreMultiplier => 1;
|
||||||
|
|
||||||
private bool isForCurrentRuleset;
|
private bool isForCurrentRuleset;
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ namespace osu.Game.Rulesets.Mania.Mods
|
|||||||
public override string ShortenedName => "RD";
|
public override string ShortenedName => "RD";
|
||||||
public override FontAwesome Icon => FontAwesome.fa_osu_dice;
|
public override FontAwesome Icon => FontAwesome.fa_osu_dice;
|
||||||
public override string Description => @"Shuffle around the keys!";
|
public override string Description => @"Shuffle around the keys!";
|
||||||
public override double ScoreMultiplier => 0;
|
public override double ScoreMultiplier => 1;
|
||||||
|
|
||||||
public void ApplyToRulesetContainer(RulesetContainer<ManiaHitObject> rulesetContainer)
|
public void ApplyToRulesetContainer(RulesetContainer<ManiaHitObject> rulesetContainer)
|
||||||
{
|
{
|
||||||
|
@ -13,8 +13,7 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
public override string ShortenedName => "AP";
|
public override string ShortenedName => "AP";
|
||||||
public override FontAwesome Icon => FontAwesome.fa_osu_mod_autopilot;
|
public override FontAwesome Icon => FontAwesome.fa_osu_mod_autopilot;
|
||||||
public override string Description => @"Automatic cursor movement - just follow the rhythm.";
|
public override string Description => @"Automatic cursor movement - just follow the rhythm.";
|
||||||
public override double ScoreMultiplier => 0;
|
public override double ScoreMultiplier => 1;
|
||||||
public override bool Ranked => false;
|
|
||||||
public override Type[] IncompatibleMods => new[] { typeof(OsuModSpunOut), typeof(ModRelax), typeof(ModSuddenDeath), typeof(ModNoFail), typeof(ModAutoplay) };
|
public override Type[] IncompatibleMods => new[] { typeof(OsuModSpunOut), typeof(ModRelax), typeof(ModSuddenDeath), typeof(ModNoFail), typeof(ModAutoplay) };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -39,8 +39,6 @@ namespace osu.Game.Tests.Visual
|
|||||||
typeof(SpecialSection),
|
typeof(SpecialSection),
|
||||||
};
|
};
|
||||||
|
|
||||||
private const string unranked_suffix = " (Unranked)";
|
|
||||||
|
|
||||||
private RulesetStore rulesets;
|
private RulesetStore rulesets;
|
||||||
private ModDisplay modDisplay;
|
private ModDisplay modDisplay;
|
||||||
private TestModSelectOverlay modSelect;
|
private TestModSelectOverlay modSelect;
|
||||||
@ -121,7 +119,7 @@ namespace osu.Game.Tests.Visual
|
|||||||
|
|
||||||
private void testManiaMods(ManiaRuleset ruleset)
|
private void testManiaMods(ManiaRuleset ruleset)
|
||||||
{
|
{
|
||||||
testMultiplierTextUnranked(ruleset.GetModsFor(ModType.Special).First(m => m is ManiaModRandom));
|
testRankedText(ruleset.GetModsFor(ModType.Special).First(m => m is ManiaModRandom));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void testSingleMod(Mod mod)
|
private void testSingleMod(Mod mod)
|
||||||
@ -198,13 +196,16 @@ namespace osu.Game.Tests.Visual
|
|||||||
checkLabelColor(Color4.White);
|
checkLabelColor(Color4.White);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void testMultiplierTextUnranked(Mod mod)
|
private void testRankedText(Mod mod)
|
||||||
{
|
{
|
||||||
AddAssert("check for ranked", () => !modSelect.MultiplierLabel.Text.EndsWith(unranked_suffix));
|
AddWaitStep(1, "wait for fade");
|
||||||
|
AddAssert("check for ranked", () => modSelect.UnrankedLabel.Alpha == 0);
|
||||||
selectNext(mod);
|
selectNext(mod);
|
||||||
AddAssert("check for unranked", () => modSelect.MultiplierLabel.Text.EndsWith(unranked_suffix));
|
AddWaitStep(1, "wait for fade");
|
||||||
|
AddAssert("check for unranked", () => modSelect.UnrankedLabel.Alpha != 0);
|
||||||
selectPrevious(mod);
|
selectPrevious(mod);
|
||||||
AddAssert("check for ranked", () => !modSelect.MultiplierLabel.Text.EndsWith(unranked_suffix));
|
AddWaitStep(1, "wait for fade");
|
||||||
|
AddAssert("check for ranked", () => modSelect.UnrankedLabel.Alpha == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void selectNext(Mod mod) => AddStep($"left click {mod.Name}", () => modSelect.GetModButton(mod)?.SelectNext(1));
|
private void selectNext(Mod mod) => AddStep($"left click {mod.Name}", () => modSelect.GetModButton(mod)?.SelectNext(1));
|
||||||
@ -240,6 +241,7 @@ namespace osu.Game.Tests.Visual
|
|||||||
}
|
}
|
||||||
|
|
||||||
public new OsuSpriteText MultiplierLabel => base.MultiplierLabel;
|
public new OsuSpriteText MultiplierLabel => base.MultiplierLabel;
|
||||||
|
public new OsuSpriteText UnrankedLabel => base.UnrankedLabel;
|
||||||
public new TriangleButton DeselectAllButton => base.DeselectAllButton;
|
public new TriangleButton DeselectAllButton => base.DeselectAllButton;
|
||||||
|
|
||||||
public new Color4 LowMultiplierColour => base.LowMultiplierColour;
|
public new Color4 LowMultiplierColour => base.LowMultiplierColour;
|
||||||
|
@ -31,7 +31,7 @@ namespace osu.Game.Overlays.Mods
|
|||||||
protected Color4 LowMultiplierColour, HighMultiplierColour;
|
protected Color4 LowMultiplierColour, HighMultiplierColour;
|
||||||
|
|
||||||
protected readonly TriangleButton DeselectAllButton;
|
protected readonly TriangleButton DeselectAllButton;
|
||||||
protected readonly OsuSpriteText MultiplierLabel;
|
protected readonly OsuSpriteText MultiplierLabel, UnrankedLabel;
|
||||||
private readonly FillFlowContainer footerContainer;
|
private readonly FillFlowContainer footerContainer;
|
||||||
|
|
||||||
protected override bool BlockPassThroughKeyboard => false;
|
protected override bool BlockPassThroughKeyboard => false;
|
||||||
@ -58,6 +58,7 @@ namespace osu.Game.Overlays.Mods
|
|||||||
|
|
||||||
LowMultiplierColour = colours.Red;
|
LowMultiplierColour = colours.Red;
|
||||||
HighMultiplierColour = colours.Green;
|
HighMultiplierColour = colours.Green;
|
||||||
|
UnrankedLabel.Colour = colours.Blue;
|
||||||
|
|
||||||
if (osu != null)
|
if (osu != null)
|
||||||
Ruleset.BindTo(osu.Ruleset);
|
Ruleset.BindTo(osu.Ruleset);
|
||||||
@ -99,15 +100,14 @@ namespace osu.Game.Overlays.Mods
|
|||||||
}
|
}
|
||||||
|
|
||||||
MultiplierLabel.Text = $"{multiplier:N2}x";
|
MultiplierLabel.Text = $"{multiplier:N2}x";
|
||||||
if (!ranked)
|
|
||||||
MultiplierLabel.Text += " (Unranked)";
|
|
||||||
|
|
||||||
if (multiplier > 1.0)
|
if (multiplier > 1.0)
|
||||||
MultiplierLabel.FadeColour(HighMultiplierColour, 200);
|
MultiplierLabel.FadeColour(HighMultiplierColour, 200);
|
||||||
else if (multiplier < 1.0)
|
else if (multiplier < 1.0)
|
||||||
MultiplierLabel.FadeColour(LowMultiplierColour, 200);
|
MultiplierLabel.FadeColour(LowMultiplierColour, 200);
|
||||||
else
|
else
|
||||||
MultiplierLabel.FadeColour(Color4.White, 200);
|
MultiplierLabel.FadeColour(Color4.White, 200);
|
||||||
|
|
||||||
|
UnrankedLabel.FadeTo(ranked ? 0 : 1, 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void PopOut()
|
protected override void PopOut()
|
||||||
@ -354,21 +354,31 @@ namespace osu.Game.Overlays.Mods
|
|||||||
{
|
{
|
||||||
Text = @"Score Multiplier:",
|
Text = @"Score Multiplier:",
|
||||||
TextSize = 30,
|
TextSize = 30,
|
||||||
Shadow = true,
|
|
||||||
Margin = new MarginPadding
|
Margin = new MarginPadding
|
||||||
{
|
{
|
||||||
Top = 5
|
Top = 5,
|
||||||
|
Right = 10
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
MultiplierLabel = new OsuSpriteText
|
MultiplierLabel = new OsuSpriteText
|
||||||
{
|
{
|
||||||
Font = @"Exo2.0-Bold",
|
Font = @"Exo2.0-Bold",
|
||||||
TextSize = 30,
|
TextSize = 30,
|
||||||
Shadow = true,
|
|
||||||
Margin = new MarginPadding
|
Margin = new MarginPadding
|
||||||
{
|
{
|
||||||
Top = 5
|
Top = 5
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
UnrankedLabel = new OsuSpriteText
|
||||||
|
{
|
||||||
|
Font = @"Exo2.0-Bold",
|
||||||
|
Text = @"(Unranked)",
|
||||||
|
TextSize = 30,
|
||||||
|
Margin = new MarginPadding
|
||||||
|
{
|
||||||
|
Top = 5,
|
||||||
|
Left = 10
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
public override string ShortenedName => "AT";
|
public override string ShortenedName => "AT";
|
||||||
public override FontAwesome Icon => FontAwesome.fa_osu_mod_auto;
|
public override FontAwesome Icon => FontAwesome.fa_osu_mod_auto;
|
||||||
public override string Description => "Watch a perfect automated play through the song.";
|
public override string Description => "Watch a perfect automated play through the song.";
|
||||||
public override double ScoreMultiplier => 0;
|
public override double ScoreMultiplier => 1;
|
||||||
public bool AllowFail => false;
|
public bool AllowFail => false;
|
||||||
public override Type[] IncompatibleMods => new[] { typeof(ModRelax), typeof(ModSuddenDeath), typeof(ModNoFail) };
|
public override Type[] IncompatibleMods => new[] { typeof(ModRelax), typeof(ModSuddenDeath), typeof(ModNoFail) };
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
public override string Name => "Relax";
|
public override string Name => "Relax";
|
||||||
public override string ShortenedName => "RX";
|
public override string ShortenedName => "RX";
|
||||||
public override FontAwesome Icon => FontAwesome.fa_osu_mod_relax;
|
public override FontAwesome Icon => FontAwesome.fa_osu_mod_relax;
|
||||||
public override double ScoreMultiplier => 0;
|
public override double ScoreMultiplier => 1;
|
||||||
public override Type[] IncompatibleMods => new[] { typeof(ModAutoplay), typeof(ModNoFail), typeof(ModSuddenDeath) };
|
public override Type[] IncompatibleMods => new[] { typeof(ModAutoplay), typeof(ModNoFail), typeof(ModSuddenDeath) };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user