Correcciones en el botón de servicio
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
#include <iostream>
|
||||
|
||||
// Constructor
|
||||
Instructions::Instructions(Screen *screen, Asset *asset, Input *input, Lang *lang, param_t *param, section_t *section, JA_Music_t *music)
|
||||
Instructions::Instructions(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;
|
||||
@@ -13,6 +13,7 @@ Instructions::Instructions(Screen *screen, Asset *asset, Input *input, Lang *lan
|
||||
this->param = param;
|
||||
this->section = section;
|
||||
this->music = music;
|
||||
this->options = options;
|
||||
renderer = screen->getRenderer();
|
||||
|
||||
// Crea objetos
|
||||
@@ -338,20 +339,32 @@ void Instructions::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