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

@@ -12,6 +12,7 @@
#include "text.h" // Para Text, TXT_CENTER, TXT_COLOR
#include "texture.h" // Para Texture
#include "options.h"
#include "global_inputs.h"
// Constructor
GameOver::GameOver()
@@ -139,36 +140,7 @@ void GameOver::checkEvents()
// Comprueba las entradas
void GameOver::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();
}
globalInputs::check();
}
// Bucle principal