diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-12-18 16:50:44 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-12-18 16:50:44 +0200 |
commit | ccde1781a07ab418050efdfb00d9231291ce52d8 (patch) | |
tree | 05ba15a890f32e5b3bc9507786ec14d56c91e365 | |
parent | 075cef7b43d2b26d32a5ccb8b916f06987af8cea (diff) |
TextBuf: Set base attributes for ANSI escapes
-rw-r--r-- | src/ui/text.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ui/text.c b/src/ui/text.c index f3d945e4..fc552db9 100644 --- a/src/ui/text.c +++ b/src/ui/text.c | |||
@@ -2242,6 +2242,7 @@ void init_TextBuf(iTextBuf *d, iWrapText *wrapText, int font, int color) { | |||
2242 | SDL_Texture *oldTarget = SDL_GetRenderTarget(render); | 2242 | SDL_Texture *oldTarget = SDL_GetRenderTarget(render); |
2243 | const iInt2 oldOrigin = origin_Paint; | 2243 | const iInt2 oldOrigin = origin_Paint; |
2244 | origin_Paint = zero_I2(); | 2244 | origin_Paint = zero_I2(); |
2245 | setBaseAttributes_Text(font, color); | ||
2245 | SDL_SetRenderTarget(render, d->texture); | 2246 | SDL_SetRenderTarget(render, d->texture); |
2246 | SDL_SetRenderDrawBlendMode(render, SDL_BLENDMODE_NONE); | 2247 | SDL_SetRenderDrawBlendMode(render, SDL_BLENDMODE_NONE); |
2247 | SDL_SetRenderDrawColor(render, 255, 255, 255, 0); | 2248 | SDL_SetRenderDrawColor(render, 255, 255, 255, 0); |
@@ -2252,6 +2253,7 @@ void init_TextBuf(iTextBuf *d, iWrapText *wrapText, int font, int color) { | |||
2252 | SDL_SetRenderTarget(render, oldTarget); | 2253 | SDL_SetRenderTarget(render, oldTarget); |
2253 | origin_Paint = oldOrigin; | 2254 | origin_Paint = oldOrigin; |
2254 | SDL_SetTextureBlendMode(d->texture, SDL_BLENDMODE_BLEND); | 2255 | SDL_SetTextureBlendMode(d->texture, SDL_BLENDMODE_BLEND); |
2256 | setBaseAttributes_Text(-1, -1); | ||
2255 | } | 2257 | } |
2256 | } | 2258 | } |
2257 | 2259 | ||