mirror of
https://github.com/raysan5/raygui.git
synced 2026-02-05 21:59:18 -05:00
Some small issues corrected
Make sure default style is not randomly changed by any control, every required GuiSetStyle() is reverted before leaving the control.
This commit is contained in:
@ -767,7 +767,7 @@ RAYGUIDEF bool GuiWindowBox(Rectangle bounds, const char *text)
|
|||||||
Fade(GetColor(GuiGetStyle(DEFAULT, BACKGROUND_COLOR)), guiAlpha));
|
Fade(GetColor(GuiGetStyle(DEFAULT, BACKGROUND_COLOR)), guiAlpha));
|
||||||
|
|
||||||
// Draw window header as status bar
|
// Draw window header as status bar
|
||||||
int defaultPadding = GuiGetStyle(DEFAULT, GROUP_PADDING);
|
int defaultPadding = GuiGetStyle(DEFAULT, INNER_PADDING);
|
||||||
int defaultTextAlign = GuiGetStyle(DEFAULT, TEXT_ALIGNMENT);
|
int defaultTextAlign = GuiGetStyle(DEFAULT, TEXT_ALIGNMENT);
|
||||||
GuiSetStyle(DEFAULT, INNER_PADDING, 8);
|
GuiSetStyle(DEFAULT, INNER_PADDING, 8);
|
||||||
GuiSetStyle(DEFAULT, TEXT_ALIGNMENT, GUI_TEXT_ALIGN_LEFT);
|
GuiSetStyle(DEFAULT, TEXT_ALIGNMENT, GUI_TEXT_ALIGN_LEFT);
|
||||||
@ -1906,6 +1906,7 @@ RAYGUIDEF float GuiSliderPro(Rectangle bounds, const char *text, float value, fl
|
|||||||
|
|
||||||
if (value > maxValue) value = maxValue;
|
if (value > maxValue) value = maxValue;
|
||||||
else if (value < minValue) value = minValue;
|
else if (value < minValue) value = minValue;
|
||||||
|
}
|
||||||
|
|
||||||
// Bar limits check
|
// Bar limits check
|
||||||
if (sliderWidth > 0) // Slider
|
if (sliderWidth > 0) // Slider
|
||||||
@ -1917,7 +1918,6 @@ RAYGUIDEF float GuiSliderPro(Rectangle bounds, const char *text, float value, fl
|
|||||||
{
|
{
|
||||||
if (slider.width > bounds.width) slider.width = bounds.width - 2*GuiGetStyle(SLIDER, BORDER_WIDTH);
|
if (slider.width > bounds.width) slider.width = bounds.width - 2*GuiGetStyle(SLIDER, BORDER_WIDTH);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
|
|
||||||
// Draw control
|
// Draw control
|
||||||
|
|||||||
Reference in New Issue
Block a user