Posant make_uniques, s'ha quedat tot enmerdat per culpa d'un struct
This commit is contained in:
@@ -4,15 +4,13 @@
|
||||
#include <SDL2/SDL_render.h> // for SDL_Renderer
|
||||
#include <string> // for basic_string, string
|
||||
#include <vector> // for vector
|
||||
#include <memory>
|
||||
#include "utils.h" // for color_t
|
||||
class Sprite;
|
||||
class Text;
|
||||
class Texture;
|
||||
#include "text.h"
|
||||
#include "texture.h"
|
||||
#include "sprite.h"
|
||||
struct JA_Sound_t;
|
||||
|
||||
#ifndef NOTIFY_H
|
||||
#define NOTIFY_H
|
||||
|
||||
class Notify
|
||||
{
|
||||
private:
|
||||
@@ -49,8 +47,8 @@ private:
|
||||
int counter;
|
||||
notification_state_e state;
|
||||
notification_position_e position;
|
||||
Texture *texture;
|
||||
Sprite *sprite;
|
||||
std::unique_ptr<Texture> texture;
|
||||
std::unique_ptr<Sprite> sprite;
|
||||
SDL_Rect rect;
|
||||
int y;
|
||||
int travelDist;
|
||||
@@ -59,9 +57,10 @@ private:
|
||||
|
||||
// Objetos y punteros
|
||||
SDL_Renderer *renderer; // El renderizador de la ventana
|
||||
Texture *textTexture; // Textura para la fuente de las notificaciones
|
||||
Texture *iconTexture; // Textura para los iconos de las notificaciones
|
||||
Text *text; // Objeto para dibujar texto
|
||||
|
||||
std::unique_ptr<Texture> textTexture; // Textura para la fuente de las notificaciones
|
||||
std::unique_ptr<Texture> iconTexture; // Textura para los iconos de las notificaciones
|
||||
std::unique_ptr<Text> text; // Objeto para dibujar texto
|
||||
|
||||
// Variables
|
||||
color_t bgColor; // Color de fondo de las notificaciones
|
||||
@@ -96,5 +95,3 @@ public:
|
||||
// Indica si hay notificaciones activas
|
||||
bool active();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user