Color: afegit static Color fromHex(const std::string& hexStr)

This commit is contained in:
2025-06-26 11:42:37 +02:00
parent 1ed09226e0
commit 78efcbccb7
6 changed files with 50 additions and 44 deletions

View File

@@ -240,19 +240,9 @@ bool setParams(const std::string &var, const std::string &value)
}
// BACKGROUND
else if (var == "background.attenuate_color.r")
else if (var == "background.attenuate_color")
{
param.background.attenuate_color.r = std::stoi(value);
}
else if (var == "background.attenuate_color.g")
{
param.background.attenuate_color.g = std::stoi(value);
}
else if (var == "background.attenuate_color.b")
{
param.background.attenuate_color.b = std::stoi(value);
param.background.attenuate_color = Color::fromHex(value);
}
else if (var == "background.attenuate_alpha")
@@ -328,19 +318,9 @@ bool setParams(const std::string &var, const std::string &value)
param.notification.sound = stringToBool(value);
}
else if (var == "notification.color.r")
else if (var == "notification.color")
{
param.notification.color.r = std::stoi(value);
}
else if (var == "notification.color.g")
{
param.notification.color.g = std::stoi(value);
}
else if (var == "notification.color.b")
{
param.notification.color.b = std::stoi(value);
param.notification.color = Color::fromHex(value);
}
// RESTO