- canvi de tecles en el editor

- actualitzada la versió de console per lo dels colorins
- clang format
This commit is contained in:
2026-04-11 07:59:34 +02:00
parent 0d4b7f518c
commit 3b052ca3a0
10 changed files with 62 additions and 47 deletions

View File

@@ -592,19 +592,29 @@ namespace Options {
const auto& c = yaml["console"];
if (c.contains("transparent")) {
try { console.transparent = c["transparent"].get_value<bool>(); } catch (...) {}
try {
console.transparent = c["transparent"].get_value<bool>();
} catch (...) {}
}
if (c.contains("bg_color")) {
try { console.bg_color = std::clamp(c["bg_color"].get_value<int>(), 0, 255); } catch (...) {}
try {
console.bg_color = std::clamp(c["bg_color"].get_value<int>(), 0, 255);
} catch (...) {}
}
if (c.contains("msg_color")) {
try { console.msg_color = std::clamp(c["msg_color"].get_value<int>(), 0, 255); } catch (...) {}
try {
console.msg_color = std::clamp(c["msg_color"].get_value<int>(), 0, 255);
} catch (...) {}
}
if (c.contains("prompt_color")) {
try { console.prompt_color = std::clamp(c["prompt_color"].get_value<int>(), 0, 255); } catch (...) {}
try {
console.prompt_color = std::clamp(c["prompt_color"].get_value<int>(), 0, 255);
} catch (...) {}
}
if (c.contains("command_color")) {
try { console.command_color = std::clamp(c["command_color"].get_value<int>(), 0, 255); } catch (...) {}
try {
console.command_color = std::clamp(c["command_color"].get_value<int>(), 0, 255);
} catch (...) {}
}
}
@@ -750,10 +760,10 @@ namespace Options {
// CONSOLE
file << "# CONSOLE\n";
file << "console:\n";
file << " transparent: " << (console.transparent ? "true" : "false") << " # true = sin fondo, false = solida\n";
file << " bg_color: " << console.bg_color << " # indice de paleta del fondo (solo si transparent: false)\n";
file << " msg_color: " << console.msg_color << " # indice de paleta de los mensajes\n";
file << " prompt_color: " << console.prompt_color << " # indice de paleta del prompt y del borde\n";
file << " transparent: " << (console.transparent ? "true" : "false") << " # true = sin fondo, false = solida\n";
file << " bg_color: " << console.bg_color << " # indice de paleta del fondo (solo si transparent: false)\n";
file << " msg_color: " << console.msg_color << " # indice de paleta de los mensajes\n";
file << " prompt_color: " << console.prompt_color << " # indice de paleta del prompt y del borde\n";
file << " command_color: " << console.command_color << " # indice de paleta del texto escrito por el usuario\n";
file << "\n";