From 0392f7b04cfb913f5fe23ddc0da3726ffcbb7d80 Mon Sep 17 00:00:00 2001 From: Salman Ahmed Date: Fri, 10 May 2024 07:36:59 +0300 Subject: [PATCH] Add tooltip to unranked indicator --- osu.Game/Screens/Select/FooterV2/FooterButtonModsV2.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/osu.Game/Screens/Select/FooterV2/FooterButtonModsV2.cs b/osu.Game/Screens/Select/FooterV2/FooterButtonModsV2.cs index 3937f1e42a..08b0407a79 100644 --- a/osu.Game/Screens/Select/FooterV2/FooterButtonModsV2.cs +++ b/osu.Game/Screens/Select/FooterV2/FooterButtonModsV2.cs @@ -14,6 +14,7 @@ using osu.Framework.Graphics.Effects; using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.UserInterface; +using osu.Framework.Localisation; using osu.Game.Configuration; using osu.Game.Graphics; using osu.Game.Graphics.Sprites; @@ -70,7 +71,7 @@ namespace osu.Game.Screens.Select.FooterV2 AddRange(new[] { - UnrankedBadge = new Container + UnrankedBadge = new ContainerWithTooltip { Position = new Vector2(BUTTON_WIDTH + 5f, -5f), Depth = float.MaxValue, @@ -82,6 +83,7 @@ namespace osu.Game.Screens.Select.FooterV2 Masking = true, BorderColour = Color4.White, BorderThickness = 2f, + TooltipText = ModSelectOverlayStrings.UnrankedExplanation, Children = new Drawable[] { new Box @@ -312,5 +314,10 @@ namespace osu.Game.Screens.Select.FooterV2 protected override void PopOut() => this.FadeOut(240, Easing.OutQuint); } } + + private partial class ContainerWithTooltip : Container, IHasTooltip + { + public LocalisableString TooltipText { get; set; } + } } }