Ya funcionan las notificaciones

This commit is contained in:
2022-11-19 10:28:15 +01:00
parent 1b49097f80
commit bc84968b23
5 changed files with 24 additions and 20 deletions

View File

@@ -136,18 +136,13 @@ void Notify::showText(std::string text)
SDL_RenderClear(renderer);
n.texture->setBlendMode(SDL_BLENDMODE_BLEND);
this->text->writeDX(TXT_CENTER | TXT_STROKE, width / 2, despV, text, 1, {255, 255, 255}, 1, {0, 0, 0});
SDL_SetRenderTarget(renderer, nullptr);
// Crea el sprite
n.sprite = new Sprite(n.rect, n.texture, renderer);
// Añade la notificación a la lista
notifications.push_back(n);
//std::cout << "Notification " << notifications.size() << std::endl;
//std::cout << "width " << width << std::endl;
//std::cout << "height " << height << std::endl;
//std::cout << "offset " << offset << std::endl;
//std::cout << "desp " << despH << std::endl;
}
// Indica si hay notificaciones activas
@@ -157,6 +152,6 @@ bool Notify::active()
{
return true;
}
return false;
}