new: treballant en Console 2.0

This commit is contained in:
2026-03-30 19:11:24 +02:00
parent 9e1b2b8960
commit 0a740a5be2
2 changed files with 116 additions and 25 deletions

View File

@@ -6,6 +6,7 @@
#include <functional> // Para function
#include <memory> // Para shared_ptr
#include <string> // Para string
#include <vector> // Para vector
class Surface;
class Sprite;
@@ -77,11 +78,15 @@ class Console {
float height_{0.0F}; // Altura del panel
// Estado de la entrada de texto
std::string msg_line_; // inicializado en constructor con CONSOLE_NAME + CONSOLE_VERSION
std::vector<std::string> msg_lines_; // Líneas de mensaje (1 o más)
std::string input_line_;
float cursor_timer_{0.0F};
bool cursor_visible_{true};
// Animación de altura dinámica
float target_height_{0.0F}; // Altura objetivo (según número de líneas de mensaje)
int notifier_offset_applied_{0}; // Acumulador del offset enviado al Notifier
// Historial de comandos (navegable con flechas arriba/abajo)
std::deque<std::string> history_;
int history_index_{-1}; // -1 = en la entrada actual (presente)