1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 04:05:35 +08:00

Remove unranked label from footer

This commit is contained in:
Joehu 2020-04-26 19:29:22 -07:00
parent 4b60be87b5
commit 8a47a615db
2 changed files with 2 additions and 39 deletions

View File

@ -117,8 +117,6 @@ namespace osu.Game.Tests.Visual.UserInterface
public void TestManiaMods() public void TestManiaMods()
{ {
changeRuleset(3); changeRuleset(3);
testRankedText(new ManiaRuleset().GetModsFor(ModType.Conversion).First(m => m is ManiaModRandom));
} }
[Test] [Test]
@ -217,15 +215,6 @@ namespace osu.Game.Tests.Visual.UserInterface
checkLabelColor(() => Color4.White); checkLabelColor(() => Color4.White);
} }
private void testRankedText(Mod mod)
{
AddUntilStep("check for ranked", () => modSelect.UnrankedLabel.Alpha == 0);
selectNext(mod);
AddUntilStep("check for unranked", () => modSelect.UnrankedLabel.Alpha != 0);
selectPrevious(mod);
AddUntilStep("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));
private void selectPrevious(Mod mod) => AddStep($"right click {mod.Name}", () => modSelect.GetModButton(mod)?.SelectNext(-1)); private void selectPrevious(Mod mod) => AddStep($"right click {mod.Name}", () => modSelect.GetModButton(mod)?.SelectNext(-1));
@ -272,7 +261,6 @@ namespace osu.Game.Tests.Visual.UserInterface
} }
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;

View File

@ -37,7 +37,6 @@ namespace osu.Game.Overlays.Mods
protected readonly TriangleButton CloseButton; protected readonly TriangleButton CloseButton;
protected readonly OsuSpriteText MultiplierLabel; protected readonly OsuSpriteText MultiplierLabel;
protected readonly OsuSpriteText UnrankedLabel;
protected override bool BlockNonPositionalInput => false; protected override bool BlockNonPositionalInput => false;
@ -268,30 +267,11 @@ namespace osu.Game.Overlays.Mods
Origin = Anchor.CentreLeft, Origin = Anchor.CentreLeft,
Anchor = Anchor.CentreLeft, Anchor = Anchor.CentreLeft,
}, },
new FillFlowContainer MultiplierLabel = new OsuSpriteText
{ {
AutoSizeAxes = Axes.Both, Font = OsuFont.GetFont(size: 25, weight: FontWeight.Bold, fixedWidth: true),
Origin = Anchor.CentreLeft, Origin = Anchor.CentreLeft,
Anchor = Anchor.CentreLeft, Anchor = Anchor.CentreLeft,
Direction = FillDirection.Vertical,
LayoutDuration = 100,
LayoutEasing = Easing.OutQuint,
Children = new Drawable[]
{
MultiplierLabel = new OsuSpriteText
{
Font = OsuFont.GetFont(size: 25, weight: FontWeight.Bold, fixedWidth: true),
Origin = Anchor.TopCentre,
Anchor = Anchor.TopCentre,
},
UnrankedLabel = new OsuSpriteText
{
Text = @"(Unranked)",
Font = OsuFont.GetFont(size: 15, weight: FontWeight.Bold),
Origin = Anchor.TopCentre,
Anchor = Anchor.TopCentre,
},
}
}, },
}, },
}, },
@ -340,7 +320,6 @@ namespace osu.Game.Overlays.Mods
{ {
LowMultiplierColour = colours.Red; LowMultiplierColour = colours.Red;
HighMultiplierColour = colours.Green; HighMultiplierColour = colours.Green;
UnrankedLabel.Colour = colours.Blue;
availableMods = osu.AvailableMods.GetBoundCopy(); availableMods = osu.AvailableMods.GetBoundCopy();
@ -444,12 +423,10 @@ namespace osu.Game.Overlays.Mods
private void updateMods() private void updateMods()
{ {
var multiplier = 1.0; var multiplier = 1.0;
var ranked = true;
foreach (var mod in SelectedMods.Value) foreach (var mod in SelectedMods.Value)
{ {
multiplier *= mod.ScoreMultiplier; multiplier *= mod.ScoreMultiplier;
ranked &= mod.Ranked;
} }
MultiplierLabel.Text = $"{multiplier:N2}x"; MultiplierLabel.Text = $"{multiplier:N2}x";
@ -459,8 +436,6 @@ namespace osu.Game.Overlays.Mods
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);
} }
private void updateModSettings(ValueChangedEvent<IReadOnlyList<Mod>> selectedMods) private void updateModSettings(ValueChangedEvent<IReadOnlyList<Mod>> selectedMods)