diff options
Diffstat (limited to 'src/ui/text.c')
-rw-r--r-- | src/ui/text.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ui/text.c b/src/ui/text.c index 8d4661ac..b2110bb6 100644 --- a/src/ui/text.c +++ b/src/ui/text.c | |||
@@ -302,6 +302,10 @@ void deinit_Text(void) { | |||
302 | iRelease(d->ansiEscape); | 302 | iRelease(d->ansiEscape); |
303 | } | 303 | } |
304 | 304 | ||
305 | void setOpacity_Text(float opacity) { | ||
306 | SDL_SetTextureAlphaMod(text_.cache, iClamp(opacity, 0.0f, 1.0f) * 255 + 0.5f); | ||
307 | } | ||
308 | |||
305 | void setContentFontSize_Text(float fontSizeFactor) { | 309 | void setContentFontSize_Text(float fontSizeFactor) { |
306 | fontSizeFactor *= contentScale_Text_; | 310 | fontSizeFactor *= contentScale_Text_; |
307 | iAssert(fontSizeFactor > 0); | 311 | iAssert(fontSizeFactor > 0); |
@@ -490,7 +494,7 @@ static enum iFontId fontId_Text_(const iFont *font) { | |||
490 | } | 494 | } |
491 | 495 | ||
492 | iLocalDef iBool isWrapBoundary_(iChar a, iChar b) { | 496 | iLocalDef iBool isWrapBoundary_(iChar a, iChar b) { |
493 | if (b == '/' || b == '-' || b == ',' || b == ';' || b == ':') { | 497 | if (b == '/' || b == '-' || b == ',' || b == ';' || b == ':' || b == '.') { |
494 | return iTrue; | 498 | return iTrue; |
495 | } | 499 | } |
496 | return !isSpace_Char(a) && isSpace_Char(b); | 500 | return !isSpace_Char(a) && isSpace_Char(b); |