new: es pot definir el color de fonfo del titol
fix: el color de fondo de la intro ara ja canvia be cap al color de fondo del titol (abans soles sabia canviar cap al blanc)
This commit is contained in:
@@ -100,6 +100,20 @@ struct Color
|
||||
|
||||
return Color(r, g, b, a);
|
||||
}
|
||||
|
||||
constexpr bool isEqualTo(const Color &other) const
|
||||
{
|
||||
return r == other.r && g == other.g && b == other.b && a == other.a;
|
||||
}
|
||||
|
||||
constexpr Color approachTo(const Color &target, int step = 1) const
|
||||
{
|
||||
Uint8 newR = (std::abs(r - target.r) <= step) ? target.r : (r < target.r ? r + step : r - step);
|
||||
Uint8 newG = (std::abs(g - target.g) <= step) ? target.g : (g < target.g ? g + step : g - step);
|
||||
Uint8 newB = (std::abs(b - target.b) <= step) ? target.b : (b < target.b ? b + step : b - step);
|
||||
|
||||
return Color(newR, newG, newB, a);
|
||||
}
|
||||
};
|
||||
|
||||
// Estructura para definir un color HSV
|
||||
|
||||
Reference in New Issue
Block a user