31 lines
884 B
C++
31 lines
884 B
C++
#pragma once
|
|
|
|
#include <vector>
|
|
#include <string>
|
|
|
|
class ServiceMenu
|
|
{
|
|
public:
|
|
// --- Métodos de singleton ---
|
|
static void init(); // Inicializa el objeto ServiceMenu
|
|
static void destroy(); // Libera el objeto ServiceMenu
|
|
static ServiceMenu *get(); // Obtiene el puntero al objeto ServiceMenu
|
|
|
|
// -- Métodos ---
|
|
void toggle();
|
|
void render();
|
|
void update();
|
|
|
|
private:
|
|
// -- Variables internas ---
|
|
bool enabled_ = false;
|
|
|
|
// --- Patrón Singleton ---
|
|
ServiceMenu() = default; // Constructor privado
|
|
~ServiceMenu() = default; // Destructor privado
|
|
ServiceMenu(const ServiceMenu &) = delete; // Evitar copia
|
|
ServiceMenu &operator=(const ServiceMenu &) = delete; // Evitar asignación
|
|
|
|
// --- Singleton ---
|
|
static ServiceMenu *instance_;
|
|
}; |