mirror of
https://github.com/ppy/osu
synced 2025-01-02 20:32:10 +00:00
Add tooltip to unranked indicator
This commit is contained in:
parent
f5ab9a7ff8
commit
0392f7b04c
@ -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; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user