Ya se ven las notificaciones por pantalla

This commit is contained in:
2022-11-15 12:57:56 +01:00
parent 7d62b3a339
commit 754671e695
6 changed files with 57 additions and 20 deletions

View File

@@ -80,8 +80,10 @@ void Notify::showText(std::string text)
n.texture = new Texture(renderer);
n.texture->createBlank(renderer, width, height, SDL_TEXTUREACCESS_TARGET);
n.texture->setAsRenderTarget(renderer);
SDL_SetRenderDrawColor(renderer, bgColor.r, bgColor.g, bgColor.b, 255);
SDL_RenderClear(renderer);
n.texture->setBlendMode(SDL_BLENDMODE_BLEND);
this->text->writeDX(TXT_CENTER | TXT_STROKE, desp, desp / 2, text, 1, {255, 255, 255}, 1, {0, 0, 0});
this->text->writeDX(TXT_CENTER | TXT_STROKE, width / 2, desp / 2, text, 1, {255, 255, 255}, 1, {0, 0, 0});
// Crea el sprite
n.sprite = new Sprite({0, 0, width, height}, n.texture, renderer);