1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-19 04:22:55 +08:00

Add tooltip to new mod pills

This commit is contained in:
mk56-spn 2023-01-16 19:30:50 +01:00
parent 3ccecc2cb5
commit 1df0492947

View File

@ -446,14 +446,17 @@ namespace osu.Game.Online.Leaderboards
}
}
private partial class ColouredModSwitchTiny : ModSwitchTiny
private partial class ColouredModSwitchTiny : ModSwitchTiny, IHasTooltip
{
private readonly IMod mod;
[Resolved]
private OsuColour colours { get; set; } = null!;
public ColouredModSwitchTiny(IMod mod)
: base(mod)
{
this.mod = mod;
Masking = true;
EdgeEffect = new EdgeEffectParameters
{
@ -470,6 +473,8 @@ namespace osu.Game.Online.Leaderboards
AcronymText.Colour = Colour4.FromHex("#555555");
Background.Colour = colours.Yellow;
}
public virtual LocalisableString TooltipText => (mod as Mod)?.IconTooltip ?? mod.Name;
}
#endregion