瀏覽代碼

Review Fade() functionality

pull/382/head
Ray San 7 年之前
父節點
當前提交
244007a99b
共有 1 個檔案被更改,包括 2 行新增4 行删除
  1. +2
    -4
      src/core.c

+ 2
- 4
src/core.c 查看文件

@ -81,7 +81,7 @@
#define SUPPORT_DEFAULT_FONT
#define SUPPORT_MOUSE_GESTURES
#define SUPPORT_CAMERA_SYSTEM
o">//#define SUPPORT_GESTURES_SYSTEM
cp">#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)

Loading…
取消
儲存