globalInputs implementat en totes les seccions excepte Title i Game

This commit is contained in:
2025-02-23 08:57:01 +01:00
parent 2ac425483b
commit 8ae686a70b
14 changed files with 121 additions and 305 deletions

View File

@@ -17,6 +17,7 @@
#include "texture.h" // Para Texture
#include "utils.h" // Para color_t, stringToColor, options_t
#include "options.h"
#include "global_inputs.h"
// Constructor
Ending::Ending()
@@ -172,37 +173,7 @@ void Ending::checkEvents()
// Comprueba las entradas
void Ending::checkInput()
{
if (input->checkInput(input_exit, REPEAT_FALSE))
{
options.section.name = SECTION_LOGO;
options.section.subsection = SUBSECTION_LOGO_TO_INTRO;
}
else if (input->checkInput(input_toggle_border, REPEAT_FALSE))
{
screen->toggleBorder();
}
else if (input->checkInput(input_toggle_videomode, REPEAT_FALSE))
{
screen->toggleVideoMode();
}
else if (input->checkInput(input_window_dec_size, REPEAT_FALSE))
{
screen->decWindowSize();
}
else if (input->checkInput(input_window_inc_size, REPEAT_FALSE))
{
screen->incWindowSize();
}
else if (input->checkInput(input_toggle_palette, REPEAT_FALSE))
{
switchPalette();
}
globalInputs::check();
}
// Inicializa los textos