Trabajando en la animacion de las notificaciones

This commit is contained in:
2022-11-15 13:47:39 +01:00
parent 54cee20883
commit b1c3e0d2af
6 changed files with 104 additions and 7 deletions

View File

@@ -17,7 +17,8 @@ private:
{
ns_rising,
ns_stay,
ns_vanishing
ns_vanishing,
ns_finished
};
struct notification_t
@@ -27,6 +28,7 @@ private:
notification_state_e state;
Texture *texture;
Sprite *sprite;
SDL_Rect rect;
};
// Objetos y punteros
@@ -35,6 +37,7 @@ private:
// Variables
color_t bgColor; // Color de fondo de las notificaciones
int waitTime; // Tiempo que se ve la notificación
std::vector<notification_t> notifications; // La lista de notificaciones activas
// Elimina las notificaciones finalizadas
@@ -46,7 +49,7 @@ public:
// Actualiza el estado de las notificaiones
void update();
// Constructor
Notify(SDL_Renderer *renderer, std::string bitmapFile, std::string textFile);