Añadidas nuevas funciones al botón de servicio

El botón de servicio se puede usar en cualquier sección del juego
This commit is contained in:
2024-09-15 13:03:53 +02:00
parent a435e3ed8c
commit 04935c652d
14 changed files with 171 additions and 40 deletions

View File

@@ -1,4 +1,5 @@
#include "instructions.h"
#include "service.h"
#include <iostream>
// Constructor
@@ -323,9 +324,10 @@ void Instructions::checkEvents()
// Comprueba las entradas
void Instructions::checkInput()
{
if (input->checkInput(input_exit, DO_NOT_ALLOW_REPEAT))
if (input->checkInput(input_exit, INPUT_DO_NOT_ALLOW_REPEAT))
{
section->name = SECTION_PROG_QUIT;
section->options = SECTION_OPTIONS_QUIT_NORMAL;
}
else if (input->checkAnyButtonPressed())
@@ -335,6 +337,22 @@ void Instructions::checkInput()
section->options = SECTION_OPTIONS_TITLE_1;
}
// Comprueba el botón de SERVICE
switch (checkServiceButton(input, 0))
{
case SERVICE_EXIT:
section->name = SECTION_PROG_QUIT;
section->options = SECTION_OPTIONS_QUIT_SHUTDOWN;
break;
case SERVICE_SHADERS:
screen->switchShaders();
break;
default:
break;
}
// Comprueba el input para el resto de objetos
screen->checkInput();
}