diff --git a/source/game.cpp b/source/game.cpp index 66c42f1..140b17b 100644 --- a/source/game.cpp +++ b/source/game.cpp @@ -2040,6 +2040,14 @@ void Game::checkInput() return; } + // Comprueba si se va a resetear el juego + if (input->checkInput(input_reset, INPUT_DO_NOT_ALLOW_REPEAT, INPUT_USE_KEYBOARD)) + { + section::name = section::NAME_INIT; + screen->showNotification("Reset"); + return; + } + for (int i = 0; i < input->getNumControllers(); ++i) { // Comprueba si se sale con el mando diff --git a/source/hiscore_table.cpp b/source/hiscore_table.cpp index 2f71027..4daa62e 100644 --- a/source/hiscore_table.cpp +++ b/source/hiscore_table.cpp @@ -199,6 +199,14 @@ void HiScoreTable::checkInput() return; } + // Comprueba si se va a resetear el juego + if (input->checkInput(input_reset, INPUT_DO_NOT_ALLOW_REPEAT, INPUT_USE_KEYBOARD)) + { + section::name = section::NAME_INIT; + screen->showNotification("Reset"); + return; + } + // Comprueba si se ha pulsado cualquier botón (de los usados para jugar) if (input->checkAnyButtonPressed()) { diff --git a/source/instructions.cpp b/source/instructions.cpp index dce88a0..3cd5f2e 100644 --- a/source/instructions.cpp +++ b/source/instructions.cpp @@ -329,6 +329,14 @@ void Instructions::checkInput() return; } + // Comprueba si se va a resetear el juego + if (input->checkInput(input_reset, INPUT_DO_NOT_ALLOW_REPEAT, INPUT_USE_KEYBOARD)) + { + section::name = section::NAME_INIT; + screen->showNotification("Reset"); + return; + } + // Comprueba si se ha pulsado cualquier botón (de los usados para jugar) if (input->checkAnyButtonPressed()) { diff --git a/source/intro.cpp b/source/intro.cpp index 3a7aa5a..f21baf5 100644 --- a/source/intro.cpp +++ b/source/intro.cpp @@ -199,6 +199,14 @@ void Intro::checkInput() return; } + // Comprueba si se va a resetear el juego + if (input->checkInput(input_reset, INPUT_DO_NOT_ALLOW_REPEAT, INPUT_USE_KEYBOARD)) + { + section::name = section::NAME_INIT; + screen->showNotification("Reset"); + return; + } + // Comprueba si se ha pulsado cualquier botón (de los usados para jugar) if (input->checkAnyButtonPressed()) { diff --git a/source/title.cpp b/source/title.cpp index 4c40142..dcc6938 100644 --- a/source/title.cpp +++ b/source/title.cpp @@ -254,6 +254,14 @@ void Title::checkInput() return; } + // Comprueba si se va a resetear el juego + if (input->checkInput(input_reset, INPUT_DO_NOT_ALLOW_REPEAT, INPUT_USE_KEYBOARD)) + { + section::name = section::NAME_INIT; + screen->showNotification("Reset"); + return; + } + // Comprueba el teclado para empezar a jugar if (input->checkInput(input_start, INPUT_DO_NOT_ALLOW_REPEAT, INPUT_USE_KEYBOARD)) {