Fix mod select panels having conflicting tooltips

Going simple with a bool instead of making `TooltipText` init-able, as the current cases will just init `string.Empty`. And not sure if we want custom tooltip text in the future.
This commit is contained in:
Joseph Madamba 2023-06-10 12:24:58 -07:00
parent 61a9c6fd7e
commit 0d51e4f6ce
No known key found for this signature in database
GPG Key ID: 8B746C7BDDF0BD76
2 changed files with 7 additions and 3 deletions

View File

@ -9,9 +9,11 @@ namespace osu.Game.Graphics.Sprites
{
public sealed partial class TruncatingSpriteText : OsuSpriteText, IHasTooltip
{
public bool ShowTooltip { get; init; } = true;
public LocalisableString TooltipText => Text;
public override bool HandlePositionalInput => IsTruncated;
public override bool HandlePositionalInput => IsTruncated && ShowTooltip;
public TruncatingSpriteText()
{

View File

@ -126,13 +126,15 @@ protected ModSelectPanel()
Margin = new MarginPadding
{
Left = -18 * ShearedOverlayContainer.SHEAR
}
},
ShowTooltip = false,
},
descriptionText = new TruncatingSpriteText
{
Font = OsuFont.Default.With(size: 12),
RelativeSizeAxes = Axes.X,
Shear = new Vector2(-ShearedOverlayContainer.SHEAR, 0)
Shear = new Vector2(-ShearedOverlayContainer.SHEAR, 0),
ShowTooltip = false,
}
}
}