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
1 changed files with 4 additions and 1 deletions

View File

@ -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]