forked from jaildesigner-jailgames/jaildoctors_dilemma
fix: controls en el mando
This commit is contained in:
@@ -93,10 +93,16 @@ void Title::handleEvent(const SDL_Event& event) {
|
||||
}
|
||||
|
||||
// Qualsevol botó del comandament al menú principal inicia partida directament
|
||||
// (els bindings ja estan definits, no cal "pulsar 1" amb el teclat).
|
||||
// (els bindings ja estan definits, no cal "pulsar 1" amb el teclat). El botó
|
||||
// BACK queda exclòs perquè es reserva per a EXIT — excepte a emscripten, on
|
||||
// no es pot sortir del joc i BACK pot actuar com a botó genèric d'inici.
|
||||
if (event.type == SDL_EVENT_GAMEPAD_BUTTON_DOWN &&
|
||||
state_ == State::MAIN_MENU &&
|
||||
!is_remapping_keyboard_ && !is_remapping_joystick_) {
|
||||
!is_remapping_keyboard_ && !is_remapping_joystick_
|
||||
#ifndef __EMSCRIPTEN__
|
||||
&& event.gbutton.button != SDL_GAMEPAD_BUTTON_BACK
|
||||
#endif
|
||||
) {
|
||||
handleMainMenuKeyPress(SDLK_1); // PLAY
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ class Notifier {
|
||||
Status state{Status::RISING};
|
||||
Shape shape{Shape::SQUARED};
|
||||
SDL_FRect rect{.x = 0.0F, .y = 0.0F, .w = 0.0F, .h = 0.0F}; // rect.y es relativo a la base de la pila
|
||||
int y{0}; // Top objetivo de la notificación relativo a la base de la pila
|
||||
int y{0}; // Top objetivo de la notificación relativo a la base de la pila
|
||||
int travel_dist{0};
|
||||
std::string code;
|
||||
bool can_be_removed{true};
|
||||
@@ -97,8 +97,8 @@ class Notifier {
|
||||
static Notifier* notifier;
|
||||
|
||||
// Métodos privados
|
||||
void clearFinishedNotifications(); // Elimina las notificaciones finalizadas
|
||||
void clearNotifications(); // Finaliza y elimina todas las notificaciones activas
|
||||
void clearFinishedNotifications(); // Elimina las notificaciones finalizadas
|
||||
void clearNotifications(); // Finaliza y elimina todas las notificaciones activas
|
||||
[[nodiscard]] auto getStackBaseY() const -> int; // Y absoluta de la base de la pila (leída de Console)
|
||||
|
||||
// Constructor y destructor privados [SINGLETON]
|
||||
|
||||
Reference in New Issue
Block a user