Improving menu class. Selector flickers when selecting
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
#include "ifdefs.h"
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#ifndef INPUT_H
|
||||
@@ -49,8 +50,8 @@ private:
|
||||
GameControllerBindings_t mGameControllerBindings[17]; // Vector con las teclas asociadas a los inputs predefinidos
|
||||
|
||||
SDL_GameController *mGameController; // Manejador para el mando
|
||||
|
||||
std::vector<SDL_GameController*> mConnectedControllers;
|
||||
std::vector<std::string> mControllerNames;
|
||||
int mNumGamepads;
|
||||
|
||||
// Comprueba si hay un mando conectado
|
||||
@@ -67,13 +68,16 @@ public:
|
||||
void bindKey(Uint8 input, SDL_Scancode code);
|
||||
|
||||
// Asigna uno de los posibles inputs a un botón del mando
|
||||
void bindGameController(Uint8 input, SDL_GameControllerButton button);
|
||||
void bindGameControllerButton(Uint8 input, SDL_GameControllerButton button);
|
||||
|
||||
// Comprueba si un input esta activo
|
||||
bool checkInput(Uint8 input, bool repeat, int device=INPUT_USE_ANY);
|
||||
|
||||
// Comprueba si hay algun mando conectado
|
||||
bool gameControllerFound();
|
||||
|
||||
// Obten el nombre de un mando de juego
|
||||
std::string getControllerName(int index);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user