forked from jaildesigner-jailgames/jaildoctors_dilemma
globalInputs implementat en totes les seccions excepte Title i Game
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include "utils.h" // Para color_t, stringToColor, options_t, secti...
|
||||
#include "options.h"
|
||||
#include "debug.h"
|
||||
#include "global_inputs.h"
|
||||
|
||||
// Constructor
|
||||
Demo::Demo()
|
||||
@@ -87,45 +88,7 @@ void Demo::checkEvents()
|
||||
// Comprueba las entradas
|
||||
void Demo::checkInput()
|
||||
{
|
||||
if (input->checkInput(input_exit, REPEAT_FALSE))
|
||||
{
|
||||
options.section.name = SECTION_QUIT;
|
||||
}
|
||||
|
||||
else if (input->checkInput(input_toggle_border, REPEAT_FALSE))
|
||||
{
|
||||
screen->toggleBorder();
|
||||
reLoadTextures();
|
||||
}
|
||||
|
||||
else if (input->checkInput(input_toggle_videomode, REPEAT_FALSE))
|
||||
{
|
||||
screen->toggleVideoMode();
|
||||
reLoadTextures();
|
||||
}
|
||||
|
||||
else if (input->checkInput(input_window_dec_size, REPEAT_FALSE))
|
||||
{
|
||||
screen->decWindowSize();
|
||||
reLoadTextures();
|
||||
}
|
||||
|
||||
else if (input->checkInput(input_window_inc_size, REPEAT_FALSE))
|
||||
{
|
||||
screen->incWindowSize();
|
||||
reLoadTextures();
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
// Bucle para el juego
|
||||
|
||||
Reference in New Issue
Block a user