continuem afegint descripcions de lo que fa cada classe
This commit is contained in:
@@ -177,6 +177,8 @@ void Background::setGradientNumber(int value)
|
||||
// Ajusta el valor de la variable
|
||||
void Background::setTransition(float value)
|
||||
{
|
||||
value = std::min(value, 1.0f);
|
||||
value = std::max(value, 0.0f);
|
||||
transition = value;
|
||||
}
|
||||
|
||||
@@ -191,13 +193,13 @@ void Background::setPos(SDL_Rect rect)
|
||||
}
|
||||
|
||||
// Ajusta el valor de la variable
|
||||
void Background::setSrcDest(SDL_Rect value)
|
||||
void Background::setSrcRect(SDL_Rect value)
|
||||
{
|
||||
srcRect = value;
|
||||
}
|
||||
|
||||
// Ajusta el valor de la variable
|
||||
void Background::setDstDest(SDL_Rect value)
|
||||
void Background::setDstRect(SDL_Rect value)
|
||||
{
|
||||
dstRect = value;
|
||||
}
|
||||
@@ -220,6 +222,10 @@ void Background::setColor(color_t color)
|
||||
// Establece la transparencia de la atenuación
|
||||
void Background::setAlpha(int alpha)
|
||||
{
|
||||
// Evita que se asignen valores fuera de rango
|
||||
alpha = std::min(alpha, 255);
|
||||
alpha = std::max(alpha, 0);
|
||||
|
||||
// Guarda el valor actual
|
||||
alphaColorTextTemp = alphaColorText;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user