RE-ADDED: Fade() function to avoid multiple breaking changes
Probably there is a better way to do this but this is a temporary solution for backward compatibility
This commit is contained in:
parent
589d606000
commit
afcc584fb6
2 changed files with 10 additions and 0 deletions
|
@ -3246,6 +3246,15 @@ void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, Rectangle destR
|
|||
}
|
||||
}
|
||||
|
||||
// Returns color with alpha applied, alpha goes from 0.0f to 1.0f
|
||||
Color Fade(Color color, float alpha)
|
||||
{
|
||||
if (alpha < 0.0f) alpha = 0.0f;
|
||||
else if (alpha > 1.0f) alpha = 1.0f;
|
||||
|
||||
return (Color){color.r, color.g, color.b, (unsigned char)(255.0f*alpha)};
|
||||
}
|
||||
|
||||
// Returns hexadecimal value for a Color
|
||||
int ColorToInt(Color color)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue