mirror of
https://github.com/ppy/osu.git
synced 2025-03-15 12:47:18 +08:00
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
osu.Game
@ -9,9 +9,11 @@ namespace osu.Game.Graphics.Sprites
|
|||||||
{
|
{
|
||||||
public sealed partial class TruncatingSpriteText : OsuSpriteText, IHasTooltip
|
public sealed partial class TruncatingSpriteText : OsuSpriteText, IHasTooltip
|
||||||
{
|
{
|
||||||
|
public bool ShowTooltip { get; init; } = true;
|
||||||
|
|
||||||
public LocalisableString TooltipText => Text;
|
public LocalisableString TooltipText => Text;
|
||||||
|
|
||||||
public override bool HandlePositionalInput => IsTruncated;
|
public override bool HandlePositionalInput => IsTruncated && ShowTooltip;
|
||||||
|
|
||||||
public TruncatingSpriteText()
|
public TruncatingSpriteText()
|
||||||
{
|
{
|
||||||
|
@ -126,13 +126,15 @@ namespace osu.Game.Overlays.Mods
|
|||||||
Margin = new MarginPadding
|
Margin = new MarginPadding
|
||||||
{
|
{
|
||||||
Left = -18 * ShearedOverlayContainer.SHEAR
|
Left = -18 * ShearedOverlayContainer.SHEAR
|
||||||
}
|
},
|
||||||
|
ShowTooltip = false,
|
||||||
},
|
},
|
||||||
descriptionText = new TruncatingSpriteText
|
descriptionText = new TruncatingSpriteText
|
||||||
{
|
{
|
||||||
Font = OsuFont.Default.With(size: 12),
|
Font = OsuFont.Default.With(size: 12),
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Shear = new Vector2(-ShearedOverlayContainer.SHEAR, 0)
|
Shear = new Vector2(-ShearedOverlayContainer.SHEAR, 0),
|
||||||
|
ShowTooltip = false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user