From cac856119c23898579fc237703a8ff3bda207dc6 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Thu, 26 Aug 2021 16:31:01 +0100 Subject: Change GetColor to take unsigned int (#1954) --- src/extras/raygui.h | 4 ++-- src/raylib.h | 2 +- src/textures.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/extras/raygui.h b/src/extras/raygui.h index bb191900..31b7ca77 100644 --- a/src/extras/raygui.h +++ b/src/extras/raygui.h @@ -1154,7 +1154,7 @@ static const char *GetDirectoryPath(const char *filePath); // -- GuiLoadStyle() // raylib functions already implemented in raygui //------------------------------------------------------------------------------- -static Color GetColor(int hexValue); // Returns a Color struct from hexadecimal value +static Color GetColor(unsigned int hexValue); // Returns a Color struct from hexadecimal value static int ColorToInt(Color color); // Returns hexadecimal value for a Color static Color Fade(Color color, float alpha); // Color fade-in or fade-out, alpha goes from 0.0f to 1.0f static bool CheckCollisionPointRec(Vector2 point, Rectangle rec); // Check if point is inside rectangle @@ -4061,7 +4061,7 @@ static Vector3 ConvertHSVtoRGB(Vector3 hsv) #if defined(RAYGUI_STANDALONE) // Returns a Color struct from hexadecimal value -static Color GetColor(int hexValue) +static Color GetColor(unsigned int hexValue) { Color color; diff --git a/src/raylib.h b/src/raylib.h index 7613dd94..fb0be178 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -1297,7 +1297,7 @@ RLAPI Vector3 ColorToHSV(Color color); // G RLAPI Color ColorFromHSV(float hue, float saturation, float value); // Get a Color from HSV values, hue [0..360], saturation/value [0..1] RLAPI Color ColorAlpha(Color color, float alpha); // Get color with alpha applied, alpha goes from 0.0f to 1.0f RLAPI Color ColorAlphaBlend(Color dst, Color src, Color tint); // Get src alpha-blended into dst color with tint -RLAPI Color GetColor(int hexValue); // Get Color structure from hexadecimal value +RLAPI Color GetColor(unsigned int hexValue); // Get Color structure from hexadecimal value RLAPI Color GetPixelColor(void *srcPtr, int format); // Get Color from a source pixel pointer of certain format RLAPI void SetPixelColor(void *dstPtr, Color color, int format); // Set color formatted into destination pixel pointer RLAPI int GetPixelDataSize(int width, int height, int format); // Get pixel data size in bytes for certain format diff --git a/src/textures.c b/src/textures.c index f8b693d6..ff55eedf 100644 --- a/src/textures.c +++ b/src/textures.c @@ -3711,7 +3711,7 @@ Color ColorAlphaBlend(Color dst, Color src, Color tint) } // Get a Color struct from hexadecimal value -Color GetColor(int hexValue) +Color GetColor(unsigned int hexValue) { Color color; -- cgit v1.2.3