diff options
Diffstat (limited to 'src/ui/text_simple.c')
-rw-r--r-- | src/ui/text_simple.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/ui/text_simple.c b/src/ui/text_simple.c index bf33b4be..8b1de64a 100644 --- a/src/ui/text_simple.c +++ b/src/ui/text_simple.c | |||
@@ -92,7 +92,7 @@ static iRect runSimple_Font_(iFont *d, const iRunArgs *args) { | |||
92 | } | 92 | } |
93 | if (args->mode & fillBackground_RunMode) { | 93 | if (args->mode & fillBackground_RunMode) { |
94 | const iColor initial = get_Color(args->color); | 94 | const iColor initial = get_Color(args->color); |
95 | SDL_SetRenderDrawColor(text_.render, initial.r, initial.g, initial.b, 0); | 95 | SDL_SetRenderDrawColor(activeText_->render, initial.r, initial.g, initial.b, 0); |
96 | } | 96 | } |
97 | /* Text rendering is not very straightforward! Let's dive in... */ | 97 | /* Text rendering is not very straightforward! Let's dive in... */ |
98 | iChar prevCh = 0; | 98 | iChar prevCh = 0; |
@@ -114,14 +114,14 @@ static iRect runSimple_Font_(iFont *d, const iRunArgs *args) { | |||
114 | chPos++; | 114 | chPos++; |
115 | iRegExpMatch m; | 115 | iRegExpMatch m; |
116 | init_RegExpMatch(&m); | 116 | init_RegExpMatch(&m); |
117 | if (match_RegExp(text_.ansiEscape, chPos, args->text.end - chPos, &m)) { | 117 | if (match_RegExp(activeText_->ansiEscape, chPos, args->text.end - chPos, &m)) { |
118 | if (mode & draw_RunMode && ~mode & permanentColorFlag_RunMode) { | 118 | if (mode & draw_RunMode && ~mode & permanentColorFlag_RunMode) { |
119 | /* Change the color. */ | 119 | /* Change the color. */ |
120 | const iColor clr = | 120 | const iColor clr = |
121 | ansiForeground_Color(capturedRange_RegExpMatch(&m, 1), tmParagraph_ColorId); | 121 | ansiForeground_Color(capturedRange_RegExpMatch(&m, 1), tmParagraph_ColorId); |
122 | SDL_SetTextureColorMod(text_.cache, clr.r, clr.g, clr.b); | 122 | SDL_SetTextureColorMod(activeText_->cache, clr.r, clr.g, clr.b); |
123 | if (args->mode & fillBackground_RunMode) { | 123 | if (args->mode & fillBackground_RunMode) { |
124 | SDL_SetRenderDrawColor(text_.render, clr.r, clr.g, clr.b, 0); | 124 | SDL_SetRenderDrawColor(activeText_->render, clr.r, clr.g, clr.b, 0); |
125 | } | 125 | } |
126 | } | 126 | } |
127 | chPos = end_RegExpMatch(&m); | 127 | chPos = end_RegExpMatch(&m); |
@@ -205,9 +205,9 @@ static iRect runSimple_Font_(iFont *d, const iRunArgs *args) { | |||
205 | } | 205 | } |
206 | if (mode & draw_RunMode && ~mode & permanentColorFlag_RunMode) { | 206 | if (mode & draw_RunMode && ~mode & permanentColorFlag_RunMode) { |
207 | const iColor clr = get_Color(colorNum); | 207 | const iColor clr = get_Color(colorNum); |
208 | SDL_SetTextureColorMod(text_.cache, clr.r, clr.g, clr.b); | 208 | SDL_SetTextureColorMod(activeText_->cache, clr.r, clr.g, clr.b); |
209 | if (args->mode & fillBackground_RunMode) { | 209 | if (args->mode & fillBackground_RunMode) { |
210 | SDL_SetRenderDrawColor(text_.render, clr.r, clr.g, clr.b, 0); | 210 | SDL_SetRenderDrawColor(activeText_->render, clr.r, clr.g, clr.b, 0); |
211 | } | 211 | } |
212 | } | 212 | } |
213 | prevCh = 0; | 213 | prevCh = 0; |
@@ -311,9 +311,9 @@ static iRect runSimple_Font_(iFont *d, const iRunArgs *args) { | |||
311 | if (args->mode & fillBackground_RunMode) { | 311 | if (args->mode & fillBackground_RunMode) { |
312 | /* Alpha blending looks much better if the RGB components don't change in | 312 | /* Alpha blending looks much better if the RGB components don't change in |
313 | the partially transparent pixels. */ | 313 | the partially transparent pixels. */ |
314 | SDL_RenderFillRect(text_.render, &dst); | 314 | SDL_RenderFillRect(activeText_->render, &dst); |
315 | } | 315 | } |
316 | SDL_RenderCopy(text_.render, text_.cache, &src, &dst); | 316 | SDL_RenderCopy(activeText_->render, activeText_->cache, &src, &dst); |
317 | } | 317 | } |
318 | xpos += advance; | 318 | xpos += advance; |
319 | if (!isSpace_Char(ch)) { | 319 | if (!isSpace_Char(ch)) { |