summaryrefslogtreecommitdiff
path: root/src/ui
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>2022-01-04 08:47:22 +0200
commit4866ecbca5b71f52852cea6a63d119fe731c9b9a (patch)
treeaa025e50d9dcf8c598acd0a792f8c1986dc68f1b /src/ui
parenta3e6469fba3585ee46cc43f200f237afb1266711 (diff)
Text: Fixed color escapes in the simple text renderer
Diffstat (limited to 'src/ui')
-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) {