mirror of
https://github.com/raysan5/raygui.git
synced 2026-01-30 10:49:19 -05:00
Corrected issue with forced property
This commit is contained in:
13
src/raygui.h
13
src/raygui.h
@ -774,8 +774,8 @@ RAYGUIDEF bool GuiWindowBox(Rectangle bounds, const char *text)
|
|||||||
GuiSetStyle(DEFAULT, TEXT_ALIGNMENT, defaultTextAlign);
|
GuiSetStyle(DEFAULT, TEXT_ALIGNMENT, defaultTextAlign);
|
||||||
|
|
||||||
// Draw window close button
|
// Draw window close button
|
||||||
int buttonBorder = GuiGetStyle(BUTTON, BORDER_WIDTH);
|
int tempBorderWidth = GuiGetStyle(BUTTON, BORDER_WIDTH);
|
||||||
int buttonTextAlignment = GuiGetStyle(BUTTON, TEXT_ALIGNMENT);
|
int tempTextAlignment = GuiGetStyle(BUTTON, TEXT_ALIGNMENT);
|
||||||
GuiSetStyle(BUTTON, BORDER_WIDTH, 1);
|
GuiSetStyle(BUTTON, BORDER_WIDTH, 1);
|
||||||
GuiSetStyle(BUTTON, TEXT_ALIGNMENT, GUI_TEXT_ALIGN_CENTER);
|
GuiSetStyle(BUTTON, TEXT_ALIGNMENT, GUI_TEXT_ALIGN_CENTER);
|
||||||
#if defined(RAYGUI_RICONS_SUPPORT)
|
#if defined(RAYGUI_RICONS_SUPPORT)
|
||||||
@ -783,8 +783,8 @@ RAYGUIDEF bool GuiWindowBox(Rectangle bounds, const char *text)
|
|||||||
#else
|
#else
|
||||||
clicked = GuiButton(buttonRec, "x");
|
clicked = GuiButton(buttonRec, "x");
|
||||||
#endif
|
#endif
|
||||||
GuiSetStyle(BUTTON, BORDER_WIDTH, buttonBorder);
|
GuiSetStyle(BUTTON, BORDER_WIDTH, tempBorderWidth);
|
||||||
GuiSetStyle(BUTTON, TEXT_ALIGNMENT, buttonTextAlignment);
|
GuiSetStyle(BUTTON, TEXT_ALIGNMENT, tempTextAlignment);
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
|
|
||||||
return clicked;
|
return clicked;
|
||||||
@ -1257,14 +1257,15 @@ RAYGUIDEF int GuiComboBox(Rectangle bounds, const char *text, int active)
|
|||||||
|
|
||||||
// Draw selector using a custom button
|
// Draw selector using a custom button
|
||||||
// NOTE: BORDER_WIDTH and TEXT_ALIGNMENT forced values
|
// NOTE: BORDER_WIDTH and TEXT_ALIGNMENT forced values
|
||||||
GuiSetStyle(BUTTON, BORDER_WIDTH, 1);
|
int tempBorderWidth = GuiGetStyle(BUTTON, BORDER_WIDTH);
|
||||||
int tempTextAlign = GuiGetStyle(BUTTON, TEXT_ALIGNMENT);
|
int tempTextAlign = GuiGetStyle(BUTTON, TEXT_ALIGNMENT);
|
||||||
|
GuiSetStyle(BUTTON, BORDER_WIDTH, 1);
|
||||||
GuiSetStyle(BUTTON, TEXT_ALIGNMENT, GUI_TEXT_ALIGN_CENTER);
|
GuiSetStyle(BUTTON, TEXT_ALIGNMENT, GUI_TEXT_ALIGN_CENTER);
|
||||||
|
|
||||||
GuiButton(selector, TextFormat("%i/%i", active + 1, elementsCount));
|
GuiButton(selector, TextFormat("%i/%i", active + 1, elementsCount));
|
||||||
|
|
||||||
GuiSetStyle(BUTTON, TEXT_ALIGNMENT, tempTextAlign);
|
GuiSetStyle(BUTTON, TEXT_ALIGNMENT, tempTextAlign);
|
||||||
GuiSetStyle(BUTTON, BORDER_WIDTH, 2);
|
GuiSetStyle(BUTTON, BORDER_WIDTH, tempBorderWidth);
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
|
|
||||||
return active;
|
return active;
|
||||||
|
|||||||
Reference in New Issue
Block a user