llevat soport per a colors amb nom

This commit is contained in:
2026-04-06 09:14:36 +02:00
parent c4a26ffa0f
commit cdf0665458
121 changed files with 676 additions and 5754 deletions

View File

@@ -1024,9 +1024,14 @@ void CommandRegistry::registerHandlers() { // NOLINT(readability-function-cogni
};
#ifdef _DEBUG
// Colores de la paleta (compartido por SET COLOR, BGCOLOR, BORDER, ITEMCOLOR1, ITEMCOLOR2)
// Colores de la paleta como índices numéricos (compartido por SET COLOR, BGCOLOR, BORDER, ITEMCOLOR1, ITEMCOLOR2)
auto color_provider = []() -> std::vector<std::string> {
return {"BLACK", "BRIGHT_BLACK", "BLUE", "BRIGHT_BLUE", "RED", "BRIGHT_RED", "MAGENTA", "BRIGHT_MAGENTA", "GREEN", "BRIGHT_GREEN", "CYAN", "BRIGHT_CYAN", "YELLOW", "BRIGHT_YELLOW", "WHITE", "BRIGHT_WHITE"};
std::vector<std::string> result;
result.reserve(64);
for (int i = 0; i < 64; ++i) {
result.push_back(std::to_string(i));
}
return result;
};
dynamic_providers_["SET COLOR"] = color_provider;
dynamic_providers_["SET BGCOLOR"] = color_provider;

View File

@@ -23,9 +23,9 @@ Notifier* Notifier::notifier = nullptr;
// Definición de estilos predefinidos
const Notifier::Style Notifier::Style::DEFAULT = {
.bg_color = static_cast<Uint8>(PaletteColor::BLUE),
.border_color = static_cast<Uint8>(PaletteColor::CYAN),
.text_color = static_cast<Uint8>(PaletteColor::CYAN),
.bg_color = 2,
.border_color = 10,
.text_color = 10,
.shape = Notifier::Shape::SQUARED,
.text_align = Notifier::TextAlign::CENTER,
.duration = 2.0F,
@@ -33,9 +33,9 @@ const Notifier::Style Notifier::Style::DEFAULT = {
.play_sound = false};
const Notifier::Style Notifier::Style::CHEEVO = {
.bg_color = static_cast<Uint8>(PaletteColor::MAGENTA),
.border_color = static_cast<Uint8>(PaletteColor::BRIGHT_MAGENTA),
.text_color = static_cast<Uint8>(PaletteColor::WHITE),
.bg_color = 6,
.border_color = 7,
.text_color = 14,
.shape = Notifier::Shape::SQUARED,
.text_align = Notifier::TextAlign::CENTER,
.duration = 4.0F,