Mercurial > hg > pub > prymula > com
view lamertetris/sources/text.C @ 17:e9c503d896a6
flappyufo-0.230919-1_add_pkgbuild
author | Przemyslaw <prymula76@outlook.com> |
---|---|
date | Sat, 24 Feb 2024 17:47:35 +0100 |
parents | 2787f5e749ae |
children |
line wrap: on
line source
#include "text.h" Text::Text(){} SDL_Surface* Text::loadFromRenderedText( std::string textureText, SDL_Color textColor, TTF_Font* font) { SDL_Surface* textSurface = TTF_RenderText_Solid( font, textureText.c_str(), textColor); if( textSurface != NULL ) { mWidth = textSurface->w; mHeight = textSurface->h; } else { printf( "Unable to render text surface! SDL_ttf Error: %s\n", TTF_GetError() ); } return textSurface; }