canvi i reinici d'escene en la consola
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
#include <deque> // Para deque (historial)
|
||||
#include <memory> // Para shared_ptr
|
||||
#include <string> // Para string
|
||||
|
||||
@@ -43,9 +44,10 @@ class Console {
|
||||
// Constantes de consola
|
||||
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 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;
|
||||
@@ -74,4 +76,9 @@ class Console {
|
||||
std::string input_line_;
|
||||
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
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user