List incompatible mods in tooltip of mod button

This commit is contained in:
Henry Lin
2021-08-22 10:13:34 +08:00
parent d3dba296d6
commit 3d402d9e78
2 changed files with 150 additions and 1 deletions

View File

@ -23,7 +23,7 @@ namespace osu.Game.Overlays.Mods
/// <summary>
/// Represents a clickable button which can cycle through one of more mods.
/// </summary>
public class ModButton : ModButtonEmpty, IHasTooltip
public class ModButton : ModButtonEmpty, IHasCustomTooltip
{
private ModIcon foregroundIcon;
private ModIcon backgroundIcon;
@ -308,5 +308,9 @@ namespace osu.Game.Overlays.Mods
Mod = mod;
}
public ITooltip GetCustomTooltip() => new ModButtonTooltip();
public object TooltipContent => SelectedMod ?? Mods[0];
}
}