From f21318f5008e2d4b1a4980b7fd22b3885206981a Mon Sep 17 00:00:00 2001 From: Ray Date: Thu, 11 Apr 2024 20:52:12 +0200 Subject: [PATCH] Update raygui.h --- src/raygui.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/raygui.h b/src/raygui.h index 4d956ee..14b2170 100644 --- a/src/raygui.h +++ b/src/raygui.h @@ -2936,11 +2936,11 @@ 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; if (value == NULL) value = &temp; + float oldValue = *value; Rectangle slider = { bounds.x, bounds.y + GuiGetStyle(SLIDER, BORDER_WIDTH) + GuiGetStyle(SLIDER, SLIDER_PADDING), 0, bounds.height - 2*GuiGetStyle(SLIDER, BORDER_WIDTH) - 2*GuiGetStyle(SLIDER, SLIDER_PADDING) };