Correcciones en el botón de servicio
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
#include "service.h"
|
||||
|
||||
// Constructor
|
||||
Intro::Intro(Screen *screen, Asset *asset, Input *input, Lang *lang, param_t *param, section_t *section, JA_Music_t *music)
|
||||
Intro::Intro(Screen *screen, Asset *asset, Input *input, Lang *lang, options_t *options, param_t *param, section_t *section, JA_Music_t *music)
|
||||
{
|
||||
// Copia los punteros
|
||||
this->screen = screen;
|
||||
@@ -208,20 +208,32 @@ void Intro::checkInput()
|
||||
}
|
||||
|
||||
// Comprueba el botón de SERVICE
|
||||
switch (checkServiceButton(input, 0))
|
||||
switch (checkServiceButton(input))
|
||||
{
|
||||
case SERVICE_EXIT:
|
||||
section->name = SECTION_PROG_QUIT;
|
||||
section->options = SECTION_OPTIONS_QUIT_SHUTDOWN;
|
||||
case SERVICE_RESET:
|
||||
{
|
||||
section->name = SECTION_PROG_LOGO;
|
||||
screen->showNotification("Reset");
|
||||
break;
|
||||
}
|
||||
|
||||
case SERVICE_SHADERS:
|
||||
screen->switchShaders();
|
||||
case SERVICE_MUTE:
|
||||
{
|
||||
const bool value = !options->audio.music.enabled;
|
||||
options->audio.music.enabled = value;
|
||||
options->audio.sound.enabled = value;
|
||||
JA_EnableMusic(value);
|
||||
JA_EnableSound(value);
|
||||
const std::string text = value ? "on" : "off";
|
||||
screen->showNotification("Audio " + text);
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Comprueba el input para el resto de objetos
|
||||
screen->checkInput();
|
||||
|
||||
Reference in New Issue
Block a user