mes comandos per a Console
This commit is contained in:
@@ -74,7 +74,7 @@ static auto parseTokens(const std::string& input) -> std::vector<std::string> {
|
||||
// Texto de ayuda común para HELP y ?
|
||||
static void printHelp() {
|
||||
SDL_Log("=== JDD CONSOLE COMMANDS ===");
|
||||
SDL_Log(" SS [ON|OFF] Supersampling (Ctrl+F4)");
|
||||
SDL_Log(" SS [ON|OFF|SIZE] Supersampling (Ctrl+F4)");
|
||||
SDL_Log(" POSTFX [ON|OFF|NEXT] Post-FX / next preset (F4/Shift+F4)");
|
||||
SDL_Log(" BORDER [ON|OFF] Decorative border (B)");
|
||||
SDL_Log(" FULLSCREEN [ON|OFF] Fullscreen mode (F3)");
|
||||
@@ -107,8 +107,30 @@ static void printHelp() {
|
||||
|
||||
// Tabla de comandos disponibles
|
||||
static const std::vector<ConsoleCommand> COMMANDS = {
|
||||
// SS [ON|OFF] — Supersampling (Ctrl+F4)
|
||||
{.keyword = "SS", .execute = BOOL_TOGGLE_CMD("Supersampling", Options::video.supersampling, Screen::get()->toggleSupersampling())},
|
||||
// SS [ON|OFF|SIZE] — Supersampling (Ctrl+F4)
|
||||
{.keyword = "SS", .execute = [](const std::vector<std::string>& args) -> std::string {
|
||||
if (!args.empty() && args[0] == "SIZE") {
|
||||
if (!Options::video.supersampling) { return "Supersampling OFF"; }
|
||||
const auto [w, h] = Screen::get()->getSsTextureSize();
|
||||
if (w == 0) { return "SS texture: not active"; }
|
||||
return "SS texture: " + std::to_string(w) + "x" + std::to_string(h);
|
||||
}
|
||||
if (args.empty()) {
|
||||
Screen::get()->toggleSupersampling();
|
||||
return std::string("Supersampling ") + (Options::video.supersampling ? "ON" : "OFF");
|
||||
}
|
||||
if (args[0] == "ON") {
|
||||
if (Options::video.supersampling) { return "Supersampling already ON"; }
|
||||
Screen::get()->toggleSupersampling();
|
||||
return "Supersampling ON";
|
||||
}
|
||||
if (args[0] == "OFF") {
|
||||
if (!Options::video.supersampling) { return "Supersampling already OFF"; }
|
||||
Screen::get()->toggleSupersampling();
|
||||
return "Supersampling OFF";
|
||||
}
|
||||
return "Usage: SS [ON|OFF|SIZE]";
|
||||
}},
|
||||
|
||||
// POSTFX [ON|OFF|NEXT] — PostFX y presets (F4 / Shift+F4)
|
||||
{.keyword = "POSTFX", .execute = [](const std::vector<std::string>& args) -> std::string {
|
||||
|
||||
Reference in New Issue
Block a user