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

@@ -14,6 +14,7 @@
#include "texture.h" // for Texture
#include "utils.h" // for color_t, stringToColor, options_t
#include "options.h"
#include "global_inputs.h"
// Constructor
Ending2::Ending2()
@@ -202,37 +203,7 @@ void Ending2::checkEvents()
// Comprueba las entradas
void Ending2::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();
}
// Bucle principal