forked from jaildesigner-jailgames/jaildoctors_dilemma
canvi de pc enmig de la enfangà
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include <SDL2/SDL_render.h> // Para SDL_Renderer
|
||||
#include <string> // Para string
|
||||
#include <vector> // Para vector
|
||||
#include <memory>
|
||||
class Asset;
|
||||
class Screen;
|
||||
class Text;
|
||||
@@ -17,11 +18,10 @@ private:
|
||||
static Debug *debug_;
|
||||
|
||||
// Objetos y punteros
|
||||
Screen *screen_; // Objeto encargado de dibujar en pantalla
|
||||
SDL_Renderer *renderer_; // El renderizador de la ventana
|
||||
Asset *asset_; // Objeto con los ficheros de recursos
|
||||
Text *text_; // Objeto encargado de escribir texto en pantalla
|
||||
Texture *texture_; // Textura para el texto
|
||||
Screen *screen_; // Objeto encargado de dibujar en pantalla
|
||||
SDL_Renderer *renderer_; // El renderizador de la ventana
|
||||
std::shared_ptr<Text> text_; // Objeto encargado de escribir texto en pantalla
|
||||
std::shared_ptr<Texture> texture_; // Textura para el texto
|
||||
|
||||
// Variables
|
||||
std::vector<std::string> slot_; // Vector con los textos a escribir
|
||||
@@ -34,7 +34,7 @@ private:
|
||||
Debug();
|
||||
|
||||
// Destructor
|
||||
~Debug();
|
||||
~Debug() = default;
|
||||
|
||||
public:
|
||||
// [SINGLETON] Crearemos el objeto con esta función estática
|
||||
@@ -55,24 +55,14 @@ public:
|
||||
// Establece la posición donde se colocará la información de debug
|
||||
void setPos(SDL_Point p);
|
||||
|
||||
// Añade un texto para mostrar
|
||||
void add(std::string text);
|
||||
// Getters
|
||||
bool getEnabled() { return enabled_; }
|
||||
|
||||
// Borra la información de debug
|
||||
void clear();
|
||||
|
||||
// Añade un texto para mostrar en el apartado log
|
||||
void addToLog(std::string text);
|
||||
|
||||
// Borra la información de debug del apartado log
|
||||
void clearLog();
|
||||
|
||||
// Establece el valor de la variable
|
||||
void setEnabled(bool value);
|
||||
|
||||
// Obtiene el valor de la variable
|
||||
bool getEnabled();
|
||||
|
||||
// Cambia el valor de la variable
|
||||
void switchEnabled();
|
||||
// Setters
|
||||
void add(std::string text) { slot_.push_back(text); }
|
||||
void clear() { slot_.clear(); }
|
||||
void addToLog(std::string text) { log_.push_back(text); }
|
||||
void clearLog() { log_.clear(); }
|
||||
void setEnabled(bool value) { enabled_ = value; }
|
||||
void switchEnabled() { enabled_ = !enabled_; }
|
||||
};
|
||||
Reference in New Issue
Block a user