mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-24 06:59:10 +00:00
Fix 3d4b98845a
: TC_FORCED no longer working.
Since initial colour is no longer passed to the text layout, TC_FORCED flag is not seen by the layouter, so it had no effect. Instead, check for TC_FORCED when drawing and avoid using the string's colours if set.
This commit is contained in:
@@ -590,7 +590,7 @@ static int DrawLayoutLine(const ParagraphLayouter::Line &line, int y, int left,
|
||||
|
||||
FontCache *fc = f->fc;
|
||||
TextColour colour = f->colour;
|
||||
if (colour == TC_INVALID) colour = default_colour;
|
||||
if (colour == TC_INVALID || HasFlag(default_colour, TC_FORCED)) colour = default_colour;
|
||||
colour_has_shadow = (colour & TC_NO_SHADE) == 0 && colour != TC_BLACK;
|
||||
SetColourRemap(do_shadow ? TC_BLACK : colour); // the last run also sets the colour for the truncation dots
|
||||
if (do_shadow && (!fc->GetDrawGlyphShadow() || !colour_has_shadow)) continue;
|
||||
|
Reference in New Issue
Block a user