From 2c51c98625b225cecfb9628c30d62d4e30f7e3e1 Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Thu, 25 Jan 2024 15:41:57 +0100 Subject: Ported to SDL2 --- src/gui/truetypefont.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/gui/truetypefont.cpp') diff --git a/src/gui/truetypefont.cpp b/src/gui/truetypefont.cpp index 620ba191..443adaa5 100644 --- a/src/gui/truetypefont.cpp +++ b/src/gui/truetypefont.cpp @@ -28,6 +28,7 @@ #include "utils/stringutils.h" +#include #include const unsigned int CACHE_SIZE = 256; @@ -53,9 +54,10 @@ class TextChunk void generate(TTF_Font *font) { SDL_Color sdlCol; - sdlCol.b = color.b; sdlCol.r = color.r; sdlCol.g = color.g; + sdlCol.b = color.b; + sdlCol.a = color.a; const char *str = getSafeUtf8String(text); SDL_Surface *surface = TTF_RenderUTF8_Blended( -- cgit v1.2.3-70-g09d2