Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mod preset tooltip's description text being cut off #29166

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions osu.Game/Overlays/Mods/ModPresetTooltip.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Rulesets.Mods;
using osuTK;

Expand All @@ -19,7 +18,7 @@ public partial class ModPresetTooltip : VisibilityContainer, ITooltip<ModPreset>

private const double transition_duration = 200;

private readonly OsuSpriteText descriptionText;
private readonly TextFlowContainer descriptionText;

public ModPresetTooltip(OverlayColourProvider colourProvider)
{
Expand All @@ -44,11 +43,15 @@ public ModPresetTooltip(OverlayColourProvider colourProvider)
Spacing = new Vector2(7),
Children = new[]
{
descriptionText = new OsuSpriteText
descriptionText = new TextFlowContainer(f =>
{
Font = OsuFont.GetFont(weight: FontWeight.Regular),
Colour = colourProvider.Content1,
},
f.Font = OsuFont.GetFont(weight: FontWeight.Regular);
f.Colour = colourProvider.Content1;
})
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
}
}
}
};
Expand Down
Loading