Afegida confirmació per eixir del joc
This commit is contained in:
@@ -196,8 +196,7 @@ void Intro::checkInput()
|
||||
// Comprueba si se sale con el teclado
|
||||
if (input->checkInput(input_exit, INPUT_DO_NOT_ALLOW_REPEAT, INPUT_USE_KEYBOARD))
|
||||
{
|
||||
section->name = SECTION_PROG_QUIT;
|
||||
section->options = SECTION_OPTIONS_QUIT_NORMAL;
|
||||
quit(SECTION_OPTIONS_QUIT_NORMAL);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -209,9 +208,16 @@ void Intro::checkInput()
|
||||
section->options = SECTION_OPTIONS_TITLE_1;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
for (int i = 0; i < input->getNumControllers(); ++i)
|
||||
{
|
||||
{
|
||||
// Comprueba si se sale con el mando
|
||||
if (input->checkModInput(input_service, input_exit, INPUT_DO_NOT_ALLOW_REPEAT, INPUT_USE_GAMECONTROLLER, i))
|
||||
{
|
||||
quit(SECTION_OPTIONS_QUIT_SHUTDOWN);
|
||||
return;
|
||||
}
|
||||
|
||||
// Comprueba si se va a resetear el juego
|
||||
if (input->checkModInput(input_service, input_reset, INPUT_DO_NOT_ALLOW_REPEAT, INPUT_USE_GAMECONTROLLER, i))
|
||||
{
|
||||
@@ -455,3 +461,17 @@ void Intro::run()
|
||||
render();
|
||||
}
|
||||
}
|
||||
|
||||
// Termina
|
||||
void Intro::quit(int code)
|
||||
{
|
||||
if (screen->notificationsAreActive())
|
||||
{
|
||||
section->name = SECTION_PROG_QUIT;
|
||||
section->options = code;
|
||||
}
|
||||
else
|
||||
{
|
||||
screen->showNotification("Torna a polsar per eixir");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user