Opened 9 years ago
Last modified 6 years ago
#3351 closed defect
GUI doesn't center text correctly if text has newline — at Version 1
Reported by: | elexis | Owned by: | |
---|---|---|---|
Priority: | Should Have | Milestone: | Alpha 23 |
Component: | Core engine | Keywords: | |
Cc: | Patch: |
Description (last modified by )
If you have a text element that contains multiple lines (i.e. you assign a string that has \n in it) and if that text element is set to center the text, then the text will not be aligned correctly.
Reproduce by assigning a string like "123\n123" to a text element and make sure it's centered. If you add another newline to the end of the string (i.e. "123\n123\n") then the string will be aligned correctly.
So it seems that there is a trim / whitespace removal missing somewhere in the C++ GUI part.
Bug was noticed in #3216.
Change History (3)
by , 9 years ago
Attachment: | t3351_reproduce.patch added |
---|
by , 7 years ago
Attachment: | rRZ74AM.png added |
---|
comment:1 by , 7 years ago
Description: | modified (diff) |
---|
This bug can also be observed with the FPS counter / ingame time / realtime / ceasefire counter in the top right corner.
Easy way to reproduce the error