afegit typewriter effect a console

This commit is contained in:
2026-03-30 19:16:57 +02:00
parent 0a740a5be2
commit 1fdc29e9d2
2 changed files with 31 additions and 2 deletions

View File

@@ -54,6 +54,7 @@ class Console {
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 float TYPEWRITER_CHAR_DELAY = 0.03F; // segundos entre letra y letra
// [SINGLETON]
static Console* console;
@@ -83,6 +84,10 @@ class Console {
float cursor_timer_{0.0F};
bool cursor_visible_{true};
// Efecto typewriter
int typewriter_chars_{0}; // Caracteres de msg_lines_ actualmente visibles
float typewriter_timer_{0.0F};
// 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