mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-14 00:21:34 +00:00
- Fixed: SBarInfo string center alignment didn't work with non-monospace fonts.
SVN r3271 (trunk)
This commit is contained in:
parent
dc50487432
commit
c8b8cdd13b
1 changed files with 1 additions and 1 deletions
|
@ -781,7 +781,7 @@ class CommandDrawString : public SBarInfoCommand
|
||||||
break;
|
break;
|
||||||
case ALIGN_CENTER:
|
case ALIGN_CENTER:
|
||||||
if(script->spacingCharacter == '\0')
|
if(script->spacingCharacter == '\0')
|
||||||
x -= static_cast<int> (font->StringWidth(str)+(spacing * str.Len()) / 2);
|
x -= static_cast<int> ((font->StringWidth(str)+(spacing * str.Len())) / 2);
|
||||||
else
|
else
|
||||||
x -= static_cast<int> ((font->GetCharWidth((unsigned char) script->spacingCharacter) + spacing) * str.Len() / 2);
|
x -= static_cast<int> ((font->GetCharWidth((unsigned char) script->spacingCharacter) + spacing) * str.Len() / 2);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue