Unknown version. This was tested on 4.8.2, but I'm fairly certain it's nothing new.
It makes wrapping or automatically breaking colored strings completely useless. This is both the case for StatusBarCore::DrawString's wrapwidth argument and Font::BreakLines. If the break width is set to the 10th character in BreakLines, the string \c[Red]Bazinga\c- will get split at around "Baz" because, although invisible, the color codes count towards the characters.
Color codes are factored in for purposes of wrapping
Moderator: GZDoom Developers
Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
-
- Posts: 2383
- Joined: Thu Feb 11, 2016 9:59 am
-
- Lead GZDoom+Raze Developer
- Posts: 49118
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Color codes are factored in for purposes of wrapping
Uh.
BreakLines does not measure characters, it measures screen units of the text's width. And surely it considers color control sequences, otherwise the console would look all screwed up!
BreakLines does not measure characters, it measures screen units of the text's width. And surely it considers color control sequences, otherwise the console would look all screwed up!