mirror of
https://github.com/ppy/osu.git
synced 2026-06-03 17:23:57 +08:00
Merge pull request #1669 from ninjaprawn/master
Display the correct mod tooltips in mod selection
This commit is contained in:
+1
-1
Submodule osu-framework updated: 2438afea86...0c48da1d49
@@ -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)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user