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 "text.h" // Para Text, TXT_CENTER, TXT_COLOR
#include "asset.h"
#include "options.h"
#include "global_inputs.h"
class Asset;
// Constructor
@@ -89,42 +90,7 @@ void Credits::checkEvents()
// Comprueba las entradas
void Credits::checkInput()
{
if (input_->checkInput(input_exit, REPEAT_FALSE))
{
options.section.name = SECTION_QUIT;
}
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();
}
else if (input_->checkInput(input_pause, REPEAT_FALSE) || input_->checkInput(input_accept, REPEAT_FALSE) || input_->checkInput(input_jump, REPEAT_FALSE))
{
options.section.name = SECTION_TITLE;
options.section.subsection = 0;
}
globalInputs::check();
}
// Inicializa los textos