diff options
| author | Ray San <[email protected]> | 2017-11-03 12:41:03 +0100 |
|---|---|---|
| committer | Ray San <[email protected]> | 2017-11-03 12:41:03 +0100 |
| commit | 244007a99b251926d64b5c41d6aab1462a8e37ef (patch) | |
| tree | 926f40a2091073d2d3a7e9387fdf8bf12fe6571b | |
| parent | 3c3d56bb4a6a9499ab543de8e6917c60be36d7dd (diff) | |
| download | raylib-244007a99b251926d64b5c41d6aab1462a8e37ef.tar.gz raylib-244007a99b251926d64b5c41d6aab1462a8e37ef.zip | |
Review Fade() functionality
| -rw-r--r-- | src/core.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -81,7 +81,7 @@ #define SUPPORT_DEFAULT_FONT #define SUPPORT_MOUSE_GESTURES #define SUPPORT_CAMERA_SYSTEM -//#define SUPPORT_GESTURES_SYSTEM +#define SUPPORT_GESTURES_SYSTEM #define SUPPORT_BUSY_WAIT_LOOP #define SUPPORT_GIF_RECORDING //------------------------------------------------- @@ -1109,9 +1109,7 @@ Color Fade(Color color, float alpha) if (alpha < 0.0f) alpha = 0.0f; else if (alpha > 1.0f) alpha = 1.0f; - float colorAlpha = (float)color.a*alpha; - - return (Color){color.r, color.g, color.b, (unsigned char)colorAlpha}; + return (Color){color.r, color.g, color.b, (unsigned char)(255.0f*alpha)}; } // Activate raylib logo at startup (can be done with flags) |
