Actualizadas las notificaciones a la última versión

This commit is contained in:
2023-02-12 21:28:49 +01:00
parent 3da900b102
commit 8df2638905
5 changed files with 171 additions and 28 deletions

View File

@@ -36,7 +36,8 @@ private:
struct notification_t
{
std::string text;
std::string text1;
std::string text2;
int counter;
notification_state_e state;
notification_position_e position;
@@ -49,7 +50,8 @@ private:
// Objetos y punteros
SDL_Renderer *renderer; // El renderizador de la ventana
Texture *texture; // Textura para la fuente de las notificaciones
Texture *textTexture; // Textura para la fuente de las notificaciones
Texture *iconTexture; // Textura para los iconos de las notificaciones
Text *text; // Objeto para dibujar texto
options_t *options; // Variable con todas las opciones del programa
@@ -57,7 +59,7 @@ private:
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
JA_Sound_t* sound; // Sonido a reproducir cuando suena la notificación
JA_Sound_t *sound; // Sonido a reproducir cuando suena la notificación
// Elimina las notificaciones finalizadas
void clearFinishedNotifications();
@@ -70,13 +72,13 @@ public:
void update();
// Constructor
Notify(SDL_Renderer *renderer, std::string bitmapFile, std::string textFile, std::string soundFile, options_t *options);
Notify(SDL_Renderer *renderer, std::string iconFile, std::string bitmapFile, std::string textFile, std::string soundFile, options_t *options);
// Destructor
~Notify();
// Muestra una notificación de texto por pantalla;
void showText(std::string text);
void showText(std::string text1 = "", std::string text2 = "", int icon = -1);
// Indica si hay notificaciones activas
bool active();