update raygui.h

This commit is contained in:
Fabien Freling 2023-10-13 18:15:54 +02:00
parent c51423874b
commit 7f0c088b3d

9
3rd-party/raygui.h vendored
View file

@ -2937,6 +2937,7 @@ int GuiValueBox(Rectangle bounds, const char *text, int *value, int minValue, in
int GuiSliderPro(Rectangle bounds, const char *textLeft, const char *textRight, float *value, float minValue, float maxValue, int sliderWidth)
{
int result = 0;
float oldValue = *value;
GuiState state = guiState;
float temp = (maxValue - minValue)/2.0f;
@ -3006,6 +3007,10 @@ int GuiSliderPro(Rectangle bounds, const char *textLeft, const char *textRight,
else if (*value < minValue) *value = minValue;
}
// Control value change check
if(oldValue == *value) result = 0;
else result = 1;
// Bar limits check
if (sliderWidth > 0) // Slider
{
@ -3367,7 +3372,7 @@ int GuiColorPanel(Rectangle bounds, const char *text, Color *color)
pickerSelector.y = bounds.y + (1.0f - (float)hsv.z)*bounds.height; // HSV: Value
float hue = -1.0f;
Vector3 maxHue = { hue >= 0.0f ? hue : hsv.x, 1.0f, 1.0f };
Vector3 maxHue = { (hue >= 0.0f)? hue : hsv.x, 1.0f, 1.0f };
Vector3 rgbHue = ConvertHSVtoRGB(maxHue);
Color maxHueCol = { (unsigned char)(255.0f*rgbHue.x),
(unsigned char)(255.0f*rgbHue.y),
@ -3681,7 +3686,7 @@ int GuiColorPanelHSV(Rectangle bounds, const char *text, Vector3 *colorHsv)
pickerSelector.y = bounds.y + (1.0f - (float)colorHsv->z)*bounds.height; // HSV: Value
float hue = -1.0f;
Vector3 maxHue = { hue >= 0.0f ? hue : colorHsv->x, 1.0f, 1.0f };
Vector3 maxHue = { (hue >= 0.0f)? hue : colorHsv->x, 1.0f, 1.0f };
Vector3 rgbHue = ConvertHSVtoRGB(maxHue);
Color maxHueCol = { (unsigned char)(255.0f*rgbHue.x),
(unsigned char)(255.0f*rgbHue.y),