mirror of https://github.com/ppy/osu
Fix language change removing mod column bold text
This commit is contained in:
parent
3ef6c60d1f
commit
e1fa959f0b
|
@ -159,12 +159,15 @@ private void createHeaderText(LocalisableString text)
|
|||
|
||||
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]
|
||||
|
|
Loading…
Reference in New Issue