clang format
This commit is contained in:
@@ -24,8 +24,8 @@ class Console {
|
||||
void handleEvent(const SDL_Event& event);
|
||||
|
||||
// Consultas
|
||||
auto isActive() -> bool; // true si RISING, ACTIVE o VANISHING
|
||||
auto getVisibleHeight() -> int; // Píxeles visibles actuales (0 = oculta, height_ = totalmente visible)
|
||||
auto isActive() -> bool; // true si RISING, ACTIVE o VANISHING
|
||||
auto getVisibleHeight() -> int; // Píxeles visibles actuales (0 = oculta, height_ = totalmente visible)
|
||||
[[nodiscard]] auto getText() const -> std::shared_ptr<Text> { return text_; }
|
||||
|
||||
private:
|
||||
@@ -43,12 +43,12 @@ class Console {
|
||||
static constexpr float SLIDE_SPEED = 120.0F;
|
||||
|
||||
// Constantes de consola
|
||||
static constexpr std::string_view CONSOLE_NAME = "JDD Console";
|
||||
static constexpr std::string_view CONSOLE_NAME = "JDD Console";
|
||||
static constexpr std::string_view CONSOLE_VERSION = "v1.0";
|
||||
static constexpr int MAX_LINE_CHARS = 28;
|
||||
static constexpr int MAX_HISTORY_SIZE = 20;
|
||||
static constexpr float CURSOR_ON_TIME = 0.5F;
|
||||
static constexpr float CURSOR_OFF_TIME = 0.3F;
|
||||
static constexpr int MAX_LINE_CHARS = 28;
|
||||
static constexpr int MAX_HISTORY_SIZE = 20;
|
||||
static constexpr float CURSOR_ON_TIME = 0.5F;
|
||||
static constexpr float CURSOR_OFF_TIME = 0.3F;
|
||||
|
||||
// [SINGLETON]
|
||||
static Console* console;
|
||||
@@ -58,9 +58,9 @@ class Console {
|
||||
~Console() = default;
|
||||
|
||||
// Métodos privados
|
||||
void buildSurface(); // Crea la Surface con el aspecto visual
|
||||
void redrawText(); // Redibuja el texto dinámico (msg + input + cursor)
|
||||
void processCommand(); // Procesa el comando introducido por el usuario
|
||||
void buildSurface(); // Crea la Surface con el aspecto visual
|
||||
void redrawText(); // Redibuja el texto dinámico (msg + input + cursor)
|
||||
void processCommand(); // Procesa el comando introducido por el usuario
|
||||
|
||||
// Objetos de renderizado
|
||||
std::shared_ptr<Text> text_;
|
||||
@@ -75,11 +75,11 @@ class Console {
|
||||
// Estado de la entrada de texto
|
||||
std::string msg_line_; // inicializado en constructor con CONSOLE_NAME + CONSOLE_VERSION
|
||||
std::string input_line_;
|
||||
float cursor_timer_{0.0F};
|
||||
bool cursor_visible_{true};
|
||||
float cursor_timer_{0.0F};
|
||||
bool cursor_visible_{true};
|
||||
|
||||
// Historial de comandos (navegable con flechas arriba/abajo)
|
||||
std::deque<std::string> history_;
|
||||
int history_index_{-1}; // -1 = en la entrada actual (presente)
|
||||
std::string saved_input_; // guarda input_line_ al empezar a navegar
|
||||
int history_index_{-1}; // -1 = en la entrada actual (presente)
|
||||
std::string saved_input_; // guarda input_line_ al empezar a navegar
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user