summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-12-27 13:45:17 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-12-27 13:45:17 +0200
commit337ab6b40fe072bed91582a43e64aedda5c4ad40 (patch)
tree25a8d1013326770abe65cbd2254b59f6f9e5dbf7
parent001aeda1724eea630dd141c642bbdd61e2b9b69a (diff)
Text: Fixed color escapes in the simple text renderer
-rw-r--r--src/ui/text_simple.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ui/text_simple.c b/src/ui/text_simple.c
index 8560c138..71942cf1 100644
--- a/src/ui/text_simple.c
+++ b/src/ui/text_simple.c
@@ -118,8 +118,9 @@ static iRect runSimple_Font_(iFont *d, const iRunArgs *args) {
118 if (match_RegExp(activeText_->ansiEscape, chPos, args->text.end - chPos, &m)) { 118 if (match_RegExp(activeText_->ansiEscape, chPos, args->text.end - chPos, &m)) {
119 if (mode & draw_RunMode && ~mode & permanentColorFlag_RunMode) { 119 if (mode & draw_RunMode && ~mode & permanentColorFlag_RunMode) {
120 /* Change the color. */ 120 /* Change the color. */
121 iColor clr; 121 iColor clr = get_Color(args->color);
122 ansiColors_Color(capturedRange_RegExpMatch(&m, 1), tmParagraph_ColorId, 122 ansiColors_Color(capturedRange_RegExpMatch(&m, 1),
123 activeText_->baseFgColorId,
123 none_ColorId, &clr, NULL); 124 none_ColorId, &clr, NULL);
124 SDL_SetTextureColorMod(activeText_->cache, clr.r, clr.g, clr.b); 125 SDL_SetTextureColorMod(activeText_->cache, clr.r, clr.g, clr.b);
125 if (args->mode & fillBackground_RunMode) { 126 if (args->mode & fillBackground_RunMode) {