mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 09:27:29 +08:00
Merge pull request #1669 from ninjaprawn/master
Display the correct mod tooltips in mod selection
This commit is contained in:
commit
d8e6ff79f7
@ -1 +1 @@
|
||||
Subproject commit 2438afea86d0ce1f91b1b2f01bca1cf8afdd4659
|
||||
Subproject commit 0c48da1d49f470d56aeab9b15651ce0a4f5ac261
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user