- [FIX] No se cridava a SDL_Init()
- [FIX] Ja funciona el gamepad - [CHG] Canviat el format del temps en la pantalla de game over - [CHG] Canvi en una habitació per a balancejar
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include "m_menu_tecles.h"
|
||||
#include "jdraw.h"
|
||||
#include "jinput.h"
|
||||
#include "controller.h"
|
||||
#include "config.h"
|
||||
#include <SDL2/SDL.h>
|
||||
|
||||
@@ -42,14 +43,13 @@ namespace modules
|
||||
if (input::keyPressed(SDL_SCANCODE_ESCAPE)) {
|
||||
return MENU_TECLES_TORNAR;
|
||||
}
|
||||
if (input::keyPressed(SDL_SCANCODE_DOWN) || input::keyPressed(config::getKey(KEY_DOWN)))
|
||||
if (controller::pressed(KEY_DOWN) || input::keyPressed(SDL_SCANCODE_DOWN))
|
||||
{ selected_option++; if (selected_option>6) selected_option=0; }
|
||||
|
||||
if (input::keyPressed(SDL_SCANCODE_UP) || input::keyPressed(config::getKey(KEY_UP)))
|
||||
if (controller::pressed(KEY_UP) || input::keyPressed(SDL_SCANCODE_UP))
|
||||
{ selected_option--; if (selected_option<0) selected_option=6; }
|
||||
|
||||
if (input::keyPressed(SDL_SCANCODE_SPACE) || input::keyPressed(SDL_SCANCODE_RETURN) ||
|
||||
input::keyPressed(config::getKey(KEY_JUMP)) || input::keyPressed(config::getKey(KEY_PICK))) {
|
||||
if (controller::pressed(KEY_JUMP) || controller::pressed(KEY_PICK) || input::keyPressed(SDL_SCANCODE_SPACE)) {
|
||||
if (selected_option==MENU_TECLES_TORNAR)
|
||||
return MENU_TECLES_TORNAR;
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user