1
0
mirror of https://github.com/ppy/osu.git synced 2026-06-03 20:06:30 +08:00

Merge pull request #1669 from ninjaprawn/master

Display the correct mod tooltips in mod selection
This commit is contained in:
Dan Balasescu
2017-12-30 17:06:00 +09:00
committed by GitHub
Unverified
3 changed files with 14 additions and 5 deletions
+12 -3
View File
@@ -204,13 +204,13 @@ namespace osu.Game.Overlays.Mods
{
iconsContainer.AddRange(new[]
{
backgroundIcon = new ModIcon(Mods[1])
backgroundIcon = new PassThroughTooltipModIcon(Mods[1])
{
Origin = Anchor.BottomRight,
Anchor = Anchor.BottomRight,
Position = new Vector2(1.5f),
},
foregroundIcon = new ModIcon(Mods[0])
foregroundIcon = new PassThroughTooltipModIcon(Mods[0])
{
Origin = Anchor.BottomRight,
Anchor = Anchor.BottomRight,
@@ -220,7 +220,7 @@ namespace osu.Game.Overlays.Mods
}
else
{
iconsContainer.Add(foregroundIcon = new ModIcon(Mod)
iconsContainer.Add(foregroundIcon = new PassThroughTooltipModIcon(Mod)
{
Origin = Anchor.Centre,
Anchor = Anchor.Centre,
@@ -259,5 +259,14 @@ namespace osu.Game.Overlays.Mods
Mod = mod;
}
private class PassThroughTooltipModIcon : ModIcon
{
public override string TooltipText => null;
public PassThroughTooltipModIcon(Mod mod) : base(mod)
{
}
}
}
}
+1 -1
View File
@@ -28,7 +28,7 @@ namespace osu.Game.Rulesets.UI
private readonly ModType type;
public string TooltipText { get; }
public virtual string TooltipText { get; }
public ModIcon(Mod mod)
{