console crea la tabla tab_completions automaticament
This commit is contained in:
@@ -2,11 +2,12 @@
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
#include <deque> // Para deque (historial)
|
||||
#include <functional> // Para function
|
||||
#include <memory> // Para shared_ptr
|
||||
#include <string> // Para string
|
||||
#include <vector> // Para vector
|
||||
#include <deque> // Para deque (historial)
|
||||
#include <functional> // Para function
|
||||
#include <memory> // Para shared_ptr
|
||||
#include <string> // Para string
|
||||
#include <unordered_map> // Para unordered_map (tab_completions_)
|
||||
#include <vector> // Para vector
|
||||
|
||||
class Surface;
|
||||
class Sprite;
|
||||
@@ -101,4 +102,5 @@ class Console {
|
||||
// Estado de autocompletado (TAB)
|
||||
std::vector<std::string> tab_matches_; // Comandos que coinciden con el prefijo actual
|
||||
int tab_index_{-1}; // Índice actual en tab_matches_
|
||||
std::unordered_map<std::string, std::vector<std::string>> tab_completions_; // Mapa pre-calculado en constructor
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user