hotkeys de shaders a F4/F5/F6

This commit is contained in:
2026-05-14 13:25:20 +02:00
parent 6f9bdcbeb6
commit 7a09c0aa89
4 changed files with 14 additions and 17 deletions
+10 -11
View File
@@ -20,21 +20,20 @@ namespace GlobalInputs {
Screen::get()->incWindowZoom();
return true;
}
if (Input::get()->checkInput(input_prev_preset, REPEAT_FALSE)) {
Screen::get()->prevPreset();
return true;
}
if (Input::get()->checkInput(input_next_preset, REPEAT_FALSE)) {
Screen::get()->nextPreset();
return true;
}
if (Input::get()->checkInput(input_toggle_shader, REPEAT_FALSE)) {
Screen::get()->toggleShaderEnabled();
return true;
}
if (Input::get()->checkInput(input_toggle_shader_type, REPEAT_FALSE)) {
Screen::get()->toggleActiveShader();
return true;
// F5/F6 només actuen quan el post-procesado està actiu.
if (Screen::get()->isShaderEnabled()) {
if (Input::get()->checkInput(input_toggle_shader_type, REPEAT_FALSE)) {
Screen::get()->toggleActiveShader();
return true;
}
if (Input::get()->checkInput(input_next_preset, REPEAT_FALSE)) {
Screen::get()->nextPreset();
return true;
}
}
return false;
}
-1
View File
@@ -35,7 +35,6 @@ enum inputs_e {
input_window_dec_size,
// GPU / shaders (hotkeys provisionales hasta que haya menú de opciones)
input_prev_preset,
input_next_preset,
input_toggle_shader,
input_toggle_shader_type,
+3 -4
View File
@@ -210,10 +210,9 @@ void Director::initInput() {
Input::get()->bindKey(input_window_dec_size, SDL_SCANCODE_F1);
Input::get()->bindKey(input_window_inc_size, SDL_SCANCODE_F2);
Input::get()->bindKey(input_window_fullscreen, SDL_SCANCODE_F3);
Input::get()->bindKey(input_prev_preset, SDL_SCANCODE_F8);
Input::get()->bindKey(input_next_preset, SDL_SCANCODE_F9);
Input::get()->bindKey(input_toggle_shader, SDL_SCANCODE_F10);
Input::get()->bindKey(input_toggle_shader_type, SDL_SCANCODE_F11);
Input::get()->bindKey(input_toggle_shader, SDL_SCANCODE_F4);
Input::get()->bindKey(input_toggle_shader_type, SDL_SCANCODE_F5);
Input::get()->bindKey(input_next_preset, SDL_SCANCODE_F6);
// Mando - Movimiento del jugador
Input::get()->bindGameControllerButton(input_up, SDL_GAMEPAD_BUTTON_DPAD_UP);