Fix: Las notificaciones ya se apilan correctamente
This commit is contained in:
@@ -30,7 +30,7 @@ Notify::~Notify()
|
||||
// Dibuja las notificaciones por pantalla
|
||||
void Notify::render()
|
||||
{
|
||||
for (int i = 0; i < (int)notifications.size(); ++i)
|
||||
for (int i = (int)notifications.size() - 1; i >= 0; --i)
|
||||
{
|
||||
notifications.at(i).sprite->render();
|
||||
}
|
||||
@@ -112,7 +112,8 @@ void Notify::showText(std::string text)
|
||||
const int despH = this->text->getCharacterSize() / 2;
|
||||
const int despV = despH;
|
||||
const int travelDist = height + despV;
|
||||
const int offset = (int)notifications.size() * (travelDist) + despV;
|
||||
// const int offset = (int)notifications.size() * (travelDist) + despV;
|
||||
const int offset = (int)notifications.size() > 0 ? notifications.back().y + travelDist : despV;
|
||||
|
||||
// Crea la notificacion
|
||||
notification_t n;
|
||||
|
||||
Reference in New Issue
Block a user