1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 00:47:24 +08:00

Fix language change removing mod column bold text

This commit is contained in:
Dan Balasescu 2022-08-22 12:59:52 +09:00
parent 3ef6c60d1f
commit e1fa959f0b

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]