mirror of
https://github.com/osukey/osukey.git
synced 2025-05-20 04:57:38 +09:00
Merge pull request #19905 from smoogipoo/fix-text-boldening
Fix language change removing mod column bold text
This commit is contained in:
commit
594353fca1
@ -159,12 +159,15 @@ namespace osu.Game.Overlays.Mods
|
|||||||
|
|
||||||
int wordIndex = 0;
|
int wordIndex = 0;
|
||||||
|
|
||||||
headerText.AddText(text, t =>
|
ITextPart part = headerText.AddText(text, t =>
|
||||||
{
|
{
|
||||||
if (wordIndex == 0)
|
if (wordIndex == 0)
|
||||||
t.Font = t.Font.With(weight: FontWeight.SemiBold);
|
t.Font = t.Font.With(weight: FontWeight.SemiBold);
|
||||||
wordIndex += 1;
|
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]
|
[BackgroundDependencyLoader]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user