1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 15:52:54 +08:00

Constrain difficulty icon tooltip to internal accessibility"

This reverts the reverted commit cd356b8eae.

Sorry for the revert-unrevert, rushly pushed without realizing it
doesn't even build.
This commit is contained in:
Salman Ahmed 2021-08-31 21:16:02 +03:00
parent cd356b8eae
commit 505824d8ea
2 changed files with 4 additions and 4 deletions

View File

@ -126,9 +126,9 @@ namespace osu.Game.Beatmaps.Drawables
difficultyBindable.BindValueChanged(difficulty => background.Colour = colours.ForStarDifficulty(difficulty.NewValue.Stars));
}
public ITooltip<DifficultyIconTooltipContent> GetCustomTooltip() => new DifficultyIconTooltip();
ITooltip<DifficultyIconTooltipContent> IHasCustomTooltip<DifficultyIconTooltipContent>.GetCustomTooltip() => new DifficultyIconTooltip();
public DifficultyIconTooltipContent TooltipContent => shouldShowTooltip ? new DifficultyIconTooltipContent(beatmap, difficultyBindable) : null;
DifficultyIconTooltipContent IHasCustomTooltip<DifficultyIconTooltipContent>.TooltipContent => shouldShowTooltip ? new DifficultyIconTooltipContent(beatmap, difficultyBindable) : null;
private class DifficultyRetriever : Component
{

View File

@ -14,7 +14,7 @@ using osuTK;
namespace osu.Game.Beatmaps.Drawables
{
public class DifficultyIconTooltip : VisibilityContainer, ITooltip<DifficultyIconTooltipContent>
internal class DifficultyIconTooltip : VisibilityContainer, ITooltip<DifficultyIconTooltipContent>
{
private readonly OsuSpriteText difficultyName, starRating;
private readonly Box background;
@ -107,7 +107,7 @@ namespace osu.Game.Beatmaps.Drawables
protected override void PopOut() => this.FadeOut(200, Easing.OutQuint);
}
public class DifficultyIconTooltipContent
internal class DifficultyIconTooltipContent
{
public readonly BeatmapInfo Beatmap;
public readonly IBindable<StarDifficulty> Difficulty;