diff --git a/source/game/ui/console.cpp b/source/game/ui/console.cpp index 247db58..eb7dfdd 100644 --- a/source/game/ui/console.cpp +++ b/source/game/ui/console.cpp @@ -14,6 +14,7 @@ #include "core/rendering/surface.hpp" // Para Surface #include "core/rendering/text.hpp" // Para Text #include "core/resources/resource_cache.hpp" // Para Resource +#include "core/locale/locale.hpp" // Para Locale #include "game/options.hpp" // Para Options #include "game/scene_manager.hpp" // Para SceneManager #include "game/ui/notifier.hpp" // Para Notifier @@ -98,7 +99,7 @@ static void printHelp() { SDL_Log(" SCENE [LOGO|LOADING|TITLE|CREDITS|GAME|ENDING|ENDING2|RESTART]"); SDL_Log(" KIOSK [ON] Enable kiosk mode"); SDL_Log(" EXIT / QUIT Quit application"); - SDL_Log(" SHOW [FPS|INFO|NOTIFICATION] Show debug overlay or test notification"); + SDL_Log(" SHOW [FPS|INFO|NOTIFICATION|CHEEVO] Show debug overlay or test notification"); SDL_Log(" HIDE [FPS|INFO] Hide debug overlay"); SDL_Log(" HELP/? Show this help in terminal"); } @@ -327,13 +328,17 @@ static const std::vector COMMANDS = { return std::string("Debug mode ") + (Debug::get()->isEnabled() ? "ON" : "OFF"); }}, - // SHOW FPS / SHOW INFO / SHOW NOTIFICATION / HIDE FPS / HIDE INFO + // SHOW FPS / SHOW INFO / SHOW NOTIFICATION / SHOW CHEEVO / HIDE FPS / HIDE INFO {.keyword = "SHOW", .execute = [](const std::vector& args) -> std::string { if (!args.empty() && args[0] == "NOTIFICATION") { Notifier::get()->show({"NOTIFICATION"}); return "Notification shown"; } - if (args.empty() || (args[0] != "FPS" && args[0] != "INFO")) { return "Usage: SHOW [FPS|INFO|NOTIFICATION]"; } + if (!args.empty() && args[0] == "CHEEVO") { + Notifier::get()->show({Locale::get()->get("achievements.header"), Locale::get()->get("achievements.c1")}, Notifier::Style::CHEEVO, -1, false); // NOLINT(readability-static-accessed-through-instance) + return "Cheevo notification shown"; + } + if (args.empty() || (args[0] != "FPS" && args[0] != "INFO")) { return "Usage: SHOW [FPS|INFO|NOTIFICATION|CHEEVO]"; } if (RenderInfo::get()->isActive()) { return "Info overlay already ON"; } RenderInfo::get()->toggle(); return "Info overlay ON";