forked from jaildesigner-jailgames/jaildoctors_dilemma
- La clase input ya admite inputs personalizados
- El juego ya utiliza el objeto input para comprobar las teclas de cambio de tamaño de ventana, pausa, etc.
This commit is contained in:
@@ -25,6 +25,35 @@
|
||||
#define INPUT_BUTTON_PAUSE 15
|
||||
#define INPUT_BUTTON_ESCAPE 16
|
||||
|
||||
enum inputs_e
|
||||
{
|
||||
// Inputs obligatorios
|
||||
input_null,
|
||||
input_up,
|
||||
input_down,
|
||||
input_left,
|
||||
input_right,
|
||||
input_pause,
|
||||
input_exit,
|
||||
input_accept,
|
||||
input_cancel,
|
||||
|
||||
// Inputs personalizados
|
||||
input_jump,
|
||||
input_switch_music,
|
||||
input_video_mode,
|
||||
input_swap_palette,
|
||||
input_window_size_1,
|
||||
input_window_size_2,
|
||||
input_window_size_3,
|
||||
input_window_size_4,
|
||||
input_change_windows_size,
|
||||
input_toggle_border,
|
||||
|
||||
// Input obligatorio
|
||||
input_number_of_inputs
|
||||
};
|
||||
|
||||
#define REPEAT_TRUE true
|
||||
#define REPEAT_FALSE false
|
||||
|
||||
@@ -81,7 +110,7 @@ public:
|
||||
void bindGameControllerButton(Uint8 input, SDL_GameControllerButton button);
|
||||
|
||||
// Comprueba si un input esta activo
|
||||
bool checkInput(Uint8 input, bool repeat, int device = INPUT_USE_ANY, int index = 0);
|
||||
bool checkInput(Uint8 input, bool repeat = true, int device = INPUT_USE_ANY, int index = 0);
|
||||
|
||||
// Comprueba si hay almenos un input activo
|
||||
bool checkAnyInput(int device = INPUT_USE_ANY, int index = 0);
|
||||
|
||||
Reference in New Issue
Block a user