Demo: añadidas notificaciones

This commit is contained in:
2023-05-07 13:33:54 +02:00
parent ef073ed713
commit 9b9fd15f4e
3 changed files with 17 additions and 63 deletions

View File

@@ -117,7 +117,7 @@ int main(int argc, char *argv[])
switch (event->key.keysym.scancode)
{
case SDL_SCANCODE_N:
screen->showNotification("Ejemplo de", "notificacion", 1);
screen->showNotification("Ejemplo de notificacion", "con 2 lineas de texto", 0);
break;
default:
@@ -135,6 +135,9 @@ int main(int argc, char *argv[])
// Incrementa el contador
counter++;
// Actualiza el objeto screen
screen->update();
// Actualiza el sprite
if (sprite->getPosX() + sprite->getWidth() > options->gameWidth or sprite->getPosX() < 0)
{