mirror of https://github.com/ppy/osu
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:
parent
61a9c6fd7e
commit
0d51e4f6ce
|
@ -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()
|
||||
{
|
||||
|
|
|
@ -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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue