presets en postfx
This commit is contained in:
@@ -91,9 +91,17 @@ void handleIncWindowZoom() {
|
||||
}
|
||||
}
|
||||
|
||||
void handleToggleShaders() {
|
||||
Screen::get()->toggleShaders();
|
||||
Notifier::get()->show({"SHADERS " + std::string(Options::video.shaders ? "ENABLED" : "DISABLED")});
|
||||
void handleTogglePostFX() {
|
||||
Screen::get()->togglePostFX();
|
||||
Notifier::get()->show({"POSTFX " + std::string(Options::video.postfx ? "ENABLED" : "DISABLED")});
|
||||
}
|
||||
|
||||
void handleNextPostFXPreset() {
|
||||
if (!Options::postfx_presets.empty()) {
|
||||
Options::current_postfx_preset = (Options::current_postfx_preset + 1) % static_cast<int>(Options::postfx_presets.size());
|
||||
Screen::get()->reloadPostFX();
|
||||
Notifier::get()->show({"POSTFX " + Options::postfx_presets[static_cast<size_t>(Options::current_postfx_preset)].name});
|
||||
}
|
||||
}
|
||||
|
||||
void handleNextPalette() {
|
||||
@@ -152,8 +160,11 @@ auto getPressedAction() -> InputAction {
|
||||
return InputAction::WINDOW_INC_ZOOM;
|
||||
}
|
||||
}
|
||||
if (Input::get()->checkAction(InputAction::TOGGLE_SHADERS, Input::DO_NOT_ALLOW_REPEAT)) {
|
||||
return InputAction::TOGGLE_SHADERS;
|
||||
if (Input::get()->checkAction(InputAction::TOGGLE_POSTFX, Input::DO_NOT_ALLOW_REPEAT)) {
|
||||
if (Options::video.postfx && (SDL_GetModState() & SDL_KMOD_SHIFT)) {
|
||||
return InputAction::NEXT_POSTFX_PRESET;
|
||||
}
|
||||
return InputAction::TOGGLE_POSTFX;
|
||||
}
|
||||
if (Input::get()->checkAction(InputAction::NEXT_PALETTE, Input::DO_NOT_ALLOW_REPEAT)) {
|
||||
return InputAction::NEXT_PALETTE;
|
||||
@@ -221,8 +232,12 @@ void handle() {
|
||||
handleIncWindowZoom();
|
||||
break;
|
||||
|
||||
case InputAction::TOGGLE_SHADERS:
|
||||
handleToggleShaders();
|
||||
case InputAction::TOGGLE_POSTFX:
|
||||
handleTogglePostFX();
|
||||
break;
|
||||
|
||||
case InputAction::NEXT_POSTFX_PRESET:
|
||||
handleNextPostFXPreset();
|
||||
break;
|
||||
|
||||
case InputAction::NEXT_PALETTE:
|
||||
|
||||
Reference in New Issue
Block a user