Transició a surface: barallantme amb tots els Color que hi ha pel codi

This commit is contained in:
2025-03-03 22:58:12 +01:00
parent b940d627d6
commit c4033e3663
20 changed files with 219 additions and 224 deletions

View File

@@ -1,13 +1,13 @@
#pragma once
#include <SDL2/SDL_rect.h> // for SDL_Rect
#include <memory> // for shared_ptr
#include <string> // for string, basic_string
#include <vector> // for vector
#include "utils.h" // for Color
class Sprite; // lines 9-9
class Text; // lines 10-10
class Texture; // lines 11-11
#include <SDL2/SDL_rect.h> // for SDL_Rect
#include <memory> // for shared_ptr
#include <string> // for string, basic_string
#include <vector> // for vector
#include "utils.h" // for Color
class SSprite; // lines 9-9
class Text; // lines 10-10
class Surface; // lines 11-11
enum class NotificationText
{
@@ -41,8 +41,8 @@ private:
struct Notification
{
std::shared_ptr<Texture> texture;
std::shared_ptr<Sprite> sprite;
std::shared_ptr<Surface> surface;
std::shared_ptr<SSprite> sprite;
std::vector<std::string> texts;
int counter;
NotificationStatus state;
@@ -56,12 +56,12 @@ private:
// Constructor
explicit Notification()
: texture(nullptr), sprite(nullptr), texts(), counter(0), state(NotificationStatus::RISING),
: surface(nullptr), sprite(nullptr), texts(), counter(0), state(NotificationStatus::RISING),
shape(NotificationShape::SQUARED), rect{0, 0, 0, 0}, y(0), travel_dist(0), code(""),
can_be_removed(true), height(0) {}
};
std::shared_ptr<Texture> icon_texture_; // Textura para los iconos de las notificaciones
std::shared_ptr<Surface> icon_surface_; // Textura para los iconos de las notificaciones
std::shared_ptr<Text> text_; // Objeto para dibujar texto
// Variables