Singletonejant

Borrat menu.cpp que no estava gastantse...mmm.. desde mai
This commit is contained in:
2025-02-22 18:27:23 +01:00
parent e361d295c1
commit fc01676df2
38 changed files with 440 additions and 1751 deletions

View File

@@ -63,9 +63,12 @@ Notifier::~Notifier()
// Dibuja las notificaciones por pantalla
void Notifier::render()
{
for (int i = (int)notifications_.size() - 1; i >= 0; --i)
if (active())
{
notifications_[i].sprite->render();
for (auto it = notifications_.rbegin(); it != notifications_.rend(); ++it)
{
it->sprite->render();
}
}
}
@@ -172,7 +175,7 @@ void Notifier::clearFinishedNotifications()
}
// Muestra una notificación de texto por pantalla;
void Notifier::showText(std::string text1, std::string text2, int icon)
void Notifier::show(std::string text1, std::string text2, int icon)
{
// Inicializa variables
const int iconSize = 16;
@@ -296,15 +299,4 @@ void Notifier::showText(std::string text1, std::string text2, int icon)
// Añade la notificación a la lista
notifications_.push_back(n);
}
// Indica si hay notificaciones activas
bool Notifier::active()
{
if ((int)notifications_.size() > 0)
{
return true;
}
return false;
}