- afegides les habitacions de tot el joc (buides)
- minimapa mostra els numeros d'habitacio - tecla per a fer captures de pantalla
This commit is contained in:
@@ -7,8 +7,9 @@
|
||||
|
||||
#include "core/input/input.hpp" // Para Input, InputAction, Input::DO_NOT_ALLOW_REPEAT
|
||||
#include "core/locale/locale.hpp" // Para Locale
|
||||
#include "core/rendering/render_info.hpp" // Para RenderInfo
|
||||
#include "core/rendering/screen.hpp" // Para Screen
|
||||
#include "core/rendering/render_info.hpp" // Para RenderInfo
|
||||
#include "core/rendering/screen.hpp" // Para Screen
|
||||
#include "core/rendering/screenshot.hpp" // Para Screenshot
|
||||
#ifdef _DEBUG
|
||||
#include "core/system/debug.hpp" // Para Debug (persistencia de render_info en debug.yaml)
|
||||
#endif
|
||||
@@ -124,6 +125,17 @@ namespace GlobalInputs {
|
||||
Notifier::get()->show({Locale::get()->get("ui.palette") + " " + toUpper(Screen::get()->getPalettePrettyName())});
|
||||
}
|
||||
|
||||
void handleScreenshot() {
|
||||
std::vector<Uint32> buffer;
|
||||
int width = 0;
|
||||
int height = 0;
|
||||
Screen::get()->captureComposite(buffer, width, height);
|
||||
std::string filename = Screenshot::save(buffer.data(), width, height);
|
||||
if (!filename.empty()) {
|
||||
Notifier::get()->show({filename});
|
||||
}
|
||||
}
|
||||
|
||||
void handleNextPaletteSortMode() {
|
||||
Screen::get()->nextPaletteSortMode();
|
||||
Notifier::get()->show({Locale::get()->get("ui.palette_sort") + " " + toUpper(Screen::get()->getPaletteSortModeName())});
|
||||
@@ -194,6 +206,10 @@ namespace GlobalInputs {
|
||||
if (Input::get()->checkAction(InputAction::TOGGLE_CONSOLE, Input::DO_NOT_ALLOW_REPEAT)) {
|
||||
return InputAction::TOGGLE_CONSOLE;
|
||||
}
|
||||
if (Input::get()->checkAction(InputAction::SCREENSHOT, Input::DO_NOT_ALLOW_REPEAT) &&
|
||||
((SDL_GetModState() & SDL_KMOD_CTRL) != 0U)) {
|
||||
return InputAction::SCREENSHOT;
|
||||
}
|
||||
return InputAction::NONE;
|
||||
}
|
||||
|
||||
@@ -294,6 +310,10 @@ namespace GlobalInputs {
|
||||
if (Console::get() != nullptr) { Console::get()->toggle(); }
|
||||
break;
|
||||
|
||||
case InputAction::SCREENSHOT:
|
||||
handleScreenshot();
|
||||
break;
|
||||
|
||||
case InputAction::TOGGLE_INFO:
|
||||
if (RenderInfo::get() != nullptr) {
|
||||
// Leemos la intención antes del toggle: isActive() incluye la
|
||||
|
||||
Reference in New Issue
Block a user