Color codes are factored in for purposes of wrapping

Is there something that doesn't work right in the latest GZDoom? Post about it here.

Moderator: GZDoom Developers

Forum rules
Please construct and post a simple demo whenever possible for all bug reports. Please provide links to everything.

If you can include a wad demonstrating the problem, please do so. Bug reports that include fully-constructed demos have a much better chance of being investigated in a timely manner than those that don't.

Please make a new topic for every bug. Don't combine multiple bugs into a single topic. Thanks!
Accensus
Posts: 2354
Joined: Thu Feb 11, 2016 9:59 am

Color codes are factored in for purposes of wrapping

Post by Accensus »

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.

Return to “Bugs”