1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-05 15:03:16 +08:00

Merge pull request #19905 from smoogipoo/fix-text-boldening

Fix language change removing mod column bold text
This commit is contained in:
Dean Herbert 2022-08-22 14:15:22 +09:00 committed by GitHub
commit 594353fca1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -159,12 +159,15 @@ namespace osu.Game.Overlays.Mods
int wordIndex = 0;
headerText.AddText(text, t =>
ITextPart part = headerText.AddText(text, t =>
{
if (wordIndex == 0)
t.Font = t.Font.With(weight: FontWeight.SemiBold);
wordIndex += 1;
});
// Reset the index so that if the parts are refreshed (e.g. through changes in localisation) the correct word is re-emboldened.
part.DrawablePartsRecreated += _ => wordIndex = 0;
}
[BackgroundDependencyLoader]