Arreglos tontos de codi

This commit is contained in:
2025-02-23 09:12:15 +01:00
parent a42141ebd7
commit f43d18e6f0
8 changed files with 10 additions and 37 deletions

View File

@@ -12,22 +12,22 @@
#include "texture.h" // Para Texture
#include "resource.h"
// [SINGLETON] Hay que definir las variables estáticas, desde el .h sólo la hemos declarado
// [SINGLETON]
Notifier *Notifier::notifier_ = nullptr;
// [SINGLETON] Crearemos el objeto screen con esta función estática
// [SINGLETON] Crearemos el objeto con esta función estática
void Notifier::init(const std::string &icon_file, std::shared_ptr<Text> text)
{
Notifier::notifier_ = new Notifier(icon_file, text);
}
// [SINGLETON] Destruiremos el objeto screen con esta función estática
// [SINGLETON] Destruiremos el objeto con esta función estática
void Notifier::destroy()
{
delete Notifier::notifier_;
}
// [SINGLETON] Con este método obtenemos el objeto screen y podemos trabajar con él
// [SINGLETON] Con este método obtenemos el objeto y podemos trabajar con él
Notifier *Notifier::get()
{
return Notifier::notifier_;