diff --git a/osu.Game/Screens/Play/HUD/ModDisplay.cs b/osu.Game/Screens/Play/HUD/ModDisplay.cs index 4cbea43ac5..f8235e5bcf 100644 --- a/osu.Game/Screens/Play/HUD/ModDisplay.cs +++ b/osu.Game/Screens/Play/HUD/ModDisplay.cs @@ -12,16 +12,20 @@ using osu.Game.Rulesets.UI; using OpenTK; using osu.Framework.Input; using osu.Game.Graphics.Containers; +using System.Linq; namespace osu.Game.Screens.Play.HUD { public class ModDisplay : Container, IHasCurrentValue> { + private const int fade_duration = 1000; + private readonly Bindable> mods = new Bindable>(); public Bindable> Current => mods; private readonly FillFlowContainer iconsContainer; + private readonly OsuSpriteText unrankedText; public ModDisplay() { @@ -35,8 +39,9 @@ namespace osu.Game.Screens.Play.HUD Direction = FillDirection.Horizontal, Margin = new MarginPadding { Left = 10, Right = 10 }, }, - new OsuSpriteText + unrankedText = new OsuSpriteText { + AlwaysPresent = true, Anchor = Anchor.BottomCentre, Origin = Anchor.TopCentre, Text = @"/ UNRANKED /", @@ -70,8 +75,13 @@ namespace osu.Game.Screens.Play.HUD private void appearTransform() { + if (mods.Value.Any(m => !m.Ranked)) + unrankedText.FadeInFromZero(fade_duration, EasingTypes.OutQuint); + else + unrankedText.Hide(); + iconsContainer.Flush(); - iconsContainer.FadeInFromZero(1000, EasingTypes.OutQuint); + iconsContainer.FadeInFromZero(fade_duration, EasingTypes.OutQuint); expand(); using (iconsContainer.BeginDelayedSequence(1200)) contract();