forked from jaildesigner-jailgames/jaildoctors_dilemma
- Cambiadas las teclas de cambiar el tamaño de ventana para adecuarse al estandar de jailgames
This commit is contained in:
@@ -7,24 +7,6 @@
|
||||
#ifndef INPUT_H
|
||||
#define INPUT_H
|
||||
|
||||
#define INPUT_NULL 0
|
||||
#define INPUT_UP 1
|
||||
#define INPUT_DOWN 2
|
||||
#define INPUT_LEFT 3
|
||||
#define INPUT_RIGHT 4
|
||||
#define INPUT_ACCEPT 5
|
||||
#define INPUT_CANCEL 6
|
||||
#define INPUT_BUTTON_1 7
|
||||
#define INPUT_BUTTON_2 8
|
||||
#define INPUT_BUTTON_3 9
|
||||
#define INPUT_BUTTON_4 10
|
||||
#define INPUT_BUTTON_5 11
|
||||
#define INPUT_BUTTON_6 12
|
||||
#define INPUT_BUTTON_7 13
|
||||
#define INPUT_BUTTON_8 14
|
||||
#define INPUT_BUTTON_PAUSE 15
|
||||
#define INPUT_BUTTON_ESCAPE 16
|
||||
|
||||
enum inputs_e
|
||||
{
|
||||
// Inputs obligatorios
|
||||
@@ -40,15 +22,12 @@ enum inputs_e
|
||||
|
||||
// Inputs personalizados
|
||||
input_jump,
|
||||
input_switch_music,
|
||||
input_video_mode,
|
||||
input_swap_palette,
|
||||
input_window_size_1,
|
||||
input_window_size_2,
|
||||
input_window_size_3,
|
||||
input_window_size_4,
|
||||
input_change_windows_size,
|
||||
input_window_fullscreen,
|
||||
input_window_inc_size,
|
||||
input_window_dec_size,
|
||||
input_toggle_border,
|
||||
input_switch_music,
|
||||
input_swap_palette,
|
||||
|
||||
// Input obligatorio
|
||||
input_number_of_inputs
|
||||
|
||||
@@ -850,7 +850,7 @@ void Menu::setDefaultActionWhenCancel(int item)
|
||||
// Gestiona la entrada de teclado y mando durante el menu
|
||||
void Menu::checkInput()
|
||||
{
|
||||
if (input->checkInput(INPUT_UP, REPEAT_FALSE))
|
||||
if (input->checkInput(input_up, REPEAT_FALSE))
|
||||
{
|
||||
if (decreaseSelectorIndex())
|
||||
{
|
||||
@@ -861,7 +861,7 @@ void Menu::checkInput()
|
||||
}
|
||||
}
|
||||
|
||||
if (input->checkInput(INPUT_DOWN, REPEAT_FALSE))
|
||||
if (input->checkInput(input_down, REPEAT_FALSE))
|
||||
{
|
||||
if (increaseSelectorIndex())
|
||||
{
|
||||
@@ -872,7 +872,7 @@ void Menu::checkInput()
|
||||
}
|
||||
}
|
||||
|
||||
if (input->checkInput(INPUT_ACCEPT, REPEAT_FALSE))
|
||||
if (input->checkInput(input_accept, REPEAT_FALSE))
|
||||
{
|
||||
itemSelected = selector.index;
|
||||
if (soundAccept)
|
||||
@@ -881,7 +881,7 @@ void Menu::checkInput()
|
||||
}
|
||||
}
|
||||
|
||||
if (input->checkInput(INPUT_CANCEL, REPEAT_FALSE))
|
||||
if (input->checkInput(input_cancel, REPEAT_FALSE))
|
||||
{
|
||||
itemSelected = defaultActionWhenCancel;
|
||||
if (soundCancel)
|
||||
|
||||
@@ -164,7 +164,7 @@ void Screen::setVideoMode(int videoMode)
|
||||
dest.x = dest.y = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Modifica el tamaño del renderizador
|
||||
SDL_RenderSetLogicalSize(renderer, windowWidth, windowHeight);
|
||||
|
||||
@@ -191,6 +191,22 @@ void Screen::setWindowSize(int size)
|
||||
setVideoMode(0);
|
||||
}
|
||||
|
||||
// Reduce el tamaño de la ventana
|
||||
void Screen::decWindowSize()
|
||||
{
|
||||
--options->windowSize;
|
||||
options->windowSize = std::max(options->windowSize, 1);
|
||||
setVideoMode(0);
|
||||
}
|
||||
|
||||
// Aumenta el tamaño de la ventana
|
||||
void Screen::incWindowSize()
|
||||
{
|
||||
++options->windowSize;
|
||||
options->windowSize = std::min(options->windowSize, 4);
|
||||
setVideoMode(0);
|
||||
}
|
||||
|
||||
// Cambia el color del borde
|
||||
void Screen::setBorderColor(color_t color)
|
||||
{
|
||||
|
||||
@@ -95,6 +95,12 @@ public:
|
||||
// Cambia el tamaño de la ventana
|
||||
void setWindowSize(int size);
|
||||
|
||||
// Reduce el tamaño de la ventana
|
||||
void decWindowSize();
|
||||
|
||||
// Aumenta el tamaño de la ventana
|
||||
void incWindowSize();
|
||||
|
||||
// Cambia el color del borde
|
||||
void setBorderColor(color_t color);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user