mirror of
https://github.com/ppy/osu.git
synced 2025-01-19 11:32:54 +08:00
Add tooltip to new mod pills
This commit is contained in:
parent
3ccecc2cb5
commit
1df0492947
@ -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]
|
[Resolved]
|
||||||
private OsuColour colours { get; set; } = null!;
|
private OsuColour colours { get; set; } = null!;
|
||||||
|
|
||||||
public ColouredModSwitchTiny(IMod mod)
|
public ColouredModSwitchTiny(IMod mod)
|
||||||
: base(mod)
|
: base(mod)
|
||||||
{
|
{
|
||||||
|
this.mod = mod;
|
||||||
Masking = true;
|
Masking = true;
|
||||||
EdgeEffect = new EdgeEffectParameters
|
EdgeEffect = new EdgeEffectParameters
|
||||||
{
|
{
|
||||||
@ -470,6 +473,8 @@ namespace osu.Game.Online.Leaderboards
|
|||||||
AcronymText.Colour = Colour4.FromHex("#555555");
|
AcronymText.Colour = Colour4.FromHex("#555555");
|
||||||
Background.Colour = colours.Yellow;
|
Background.Colour = colours.Yellow;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public virtual LocalisableString TooltipText => (mod as Mod)?.IconTooltip ?? mod.Name;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
Loading…
Reference in New Issue
Block a user