Text colour incorrect at start of a line

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!

Text colour incorrect at start of a line

Postby Talon1024 » Sun Mar 14, 2021 12:45 pm

Here's an example. The opening parenthesis before the URL should be gray, but it is orange. Only the URL should be orange.
Talon1024
 
 
 
Joined: 27 Jun 2016
Github ID: Talon1024
Operating System: Debian-like Linux (Debian, Ubuntu, Kali, Mint, etc) 64-bit
Graphics Processor: nVidia with Vulkan support

Re: Text colour incorrect at start of a line

Postby Marisa Kirisame » Sun Mar 14, 2021 2:06 pm

I can confirm this has been happening for a long time, seemingly arbitrarily, every time line breaking is involved. I just never figured a way to reproduce it consistently, though, so it's nice to see a proper report.
User avatar
Marisa Kirisame
ZScript Crimester
 
 
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: 霧雨魔理沙#1666
Twitch ID: magusmarisa
Github ID: OrdinaryMagician
Operating System: Other Linux 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Text colour incorrect at start of a line

Postby Graf Zahl » Sun Mar 14, 2021 2:45 pm

If this is about line breaking screwing up text colors, yes, this is ancient. However, due to the inevitable fact that some mods depend on it it could not be fixed.
For multiline text, each line needs to start with a color control code then.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Text colour incorrect at start of a line

Postby Marisa Kirisame » Sun Mar 14, 2021 3:24 pm

Mods depend on broken color when breaking lines?
User avatar
Marisa Kirisame
ZScript Crimester
 
 
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: 霧雨魔理沙#1666
Twitch ID: magusmarisa
Github ID: OrdinaryMagician
Operating System: Other Linux 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Text colour incorrect at start of a line

Postby Graf Zahl » Sun Mar 14, 2021 3:49 pm

Don't ask me, this was more than 10 years ago. Randi declined to fix it back then.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Text colour incorrect at start of a line

Postby Talon1024 » Sun Mar 14, 2021 5:08 pm

Graf Zahl wrote:For multiline text, each line needs to start with a color control code then.


It's not exactly multi-line... It's one line of text, but it gets wrapped to 4 lines because of the SetHudSize call.
Talon1024
 
 
 
Joined: 27 Jun 2016
Github ID: Talon1024
Operating System: Debian-like Linux (Debian, Ubuntu, Kali, Mint, etc) 64-bit
Graphics Processor: nVidia with Vulkan support

Re: Text colour incorrect at start of a line

Postby Marisa Kirisame » Mon Mar 15, 2021 3:59 am

Looking at V_BreakLines it does seem that it TRIES to preserve color escapes when splitting a line in half, but it doesn't always work, even though one quick look through the code tells me everything is fine, but maybe it goes deeper.
User avatar
Marisa Kirisame
ZScript Crimester
 
 
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: 霧雨魔理沙#1666
Twitch ID: magusmarisa
Github ID: OrdinaryMagician
Operating System: Other Linux 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support


Return to Bugs

Who is online

Users browsing this forum: No registered users and 0 guests