Afegida confirmació per eixir del joc
This commit is contained in:
@@ -107,8 +107,7 @@ void Logo::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;
|
||||
}
|
||||
|
||||
@@ -126,8 +125,7 @@ void Logo::checkInput()
|
||||
// Comprueba si se sale con el mando
|
||||
if (input->checkModInput(input_service, input_exit, INPUT_DO_NOT_ALLOW_REPEAT, INPUT_USE_GAMECONTROLLER, i))
|
||||
{
|
||||
section->name = SECTION_PROG_QUIT;
|
||||
section->options = SECTION_OPTIONS_QUIT_SHUTDOWN;
|
||||
quit(SECTION_OPTIONS_QUIT_SHUTDOWN);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -335,4 +333,18 @@ void Logo::run()
|
||||
checkEvents(); // Tiene que ir antes del render
|
||||
render();
|
||||
}
|
||||
}
|
||||
|
||||
// Termina
|
||||
void Logo::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