Corregit bug en el text a l'hora d'intercanviar els mandos. Apareixia el nom del mando que te guardat a la configuració pero no estava connectat

This commit is contained in:
2024-10-03 19:26:32 +02:00
parent fb74733f2c
commit c07fd62037
6 changed files with 33 additions and 29 deletions

View File

@@ -97,7 +97,7 @@ private:
bool enabled; // Indica si está habilitado
// Comprueba el eje del mando
bool checkAxisInput(inputs_e input, int index = 0);
bool checkAxisInput(inputs_e input, int index = 0) const;
// Constructor
Input(std::string file);
@@ -144,10 +144,10 @@ public:
bool gameControllerFound();
// Obten el número de mandos conectados
int getNumControllers();
int getNumControllers() const;
// Obten el nombre de un mando de juego
std::string getControllerName(int index);
std::string getControllerName(int index) const;
// Establece si ha de mostrar mensajes
void setVerbose(bool value);
@@ -159,22 +159,22 @@ public:
void enable();
// Obtiene el indice del controlador a partir de un event.id
int getJoyIndex(int id);
int getJoyIndex(int id) const;
// Muestra por consola los controles asignados
void printBindings(int device = INPUT_USE_KEYBOARD, int index = 0);
void printBindings(int device = INPUT_USE_KEYBOARD, int index = 0) const;
// Obtiene el SDL_GameControllerButton asignado a un input
SDL_GameControllerButton getControllerBinding(int index, inputs_e input);
SDL_GameControllerButton getControllerBinding(int index, inputs_e input) const;
// Convierte un inputs_e a std::string
std::string to_string(inputs_e input);
std::string to_string(inputs_e input) const;
// Convierte un std::string a inputs_e
inputs_e to_inputs_e(std::string name);
inputs_e to_inputs_e(std::string name) const;
// Obtiene el indice a partir del nombre del mando
int getIndexByName(std::string name);
int getIndexByName(std::string name) const;
// Activa todos los inputs. Sirve para evitar inputs sin repeticiones pero que ya vienen pulsados cuando checkInput no estaba monitorizando
void allActive(int index);