llevat soport per a colors amb nom
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user