1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 10:23:02 +08:00

Subclass ModIcon to remove the tooltip text

This commit is contained in:
Ninjaprawn 2017-12-08 11:26:34 +11:00
parent 5330ca1fa9
commit f5bea077a0

View File

@ -204,13 +204,13 @@ namespace osu.Game.Overlays.Mods
{ {
iconsContainer.AddRange(new[] iconsContainer.AddRange(new[]
{ {
backgroundIcon = new ModIcon(Mods[1]) backgroundIcon = new DisplayableModIcon(Mods[1])
{ {
Origin = Anchor.BottomRight, Origin = Anchor.BottomRight,
Anchor = Anchor.BottomRight, Anchor = Anchor.BottomRight,
Position = new Vector2(1.5f), Position = new Vector2(1.5f),
}, },
foregroundIcon = new ModIcon(Mods[0]) foregroundIcon = new DisplayableModIcon(Mods[0])
{ {
Origin = Anchor.BottomRight, Origin = Anchor.BottomRight,
Anchor = Anchor.BottomRight, Anchor = Anchor.BottomRight,
@ -220,7 +220,7 @@ namespace osu.Game.Overlays.Mods
} }
else else
{ {
iconsContainer.Add(foregroundIcon = new ModIcon(Mod) iconsContainer.Add(foregroundIcon = new DisplayableModIcon(Mod)
{ {
Origin = Anchor.Centre, Origin = Anchor.Centre,
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
@ -259,5 +259,15 @@ namespace osu.Game.Overlays.Mods
Mod = mod; Mod = mod;
} }
private class DisplayableModIcon : ModIcon {
public string TooltipText => null;
public DisplayableModIcon(Mod mod) : base(mod) {
}
}
} }
} }