Review breaking changes from PRs
This commit is contained in:
parent
fc43382050
commit
3e1162bb9a
13
src/raygui.h
13
src/raygui.h
@ -1323,13 +1323,7 @@ void GuiGroupBox(Rectangle bounds, const char *text)
|
||||
GuiDrawRectangle(RAYGUI_CLITERAL(Rectangle){ bounds.x, bounds.y + bounds.height - 1, bounds.width, GROUPBOX_LINE_THICK }, 0, BLANK, Fade(GetColor(GuiGetStyle(DEFAULT, (state == GUI_STATE_DISABLED)? BORDER_COLOR_DISABLED : LINE_COLOR)), guiAlpha));
|
||||
GuiDrawRectangle(RAYGUI_CLITERAL(Rectangle){ bounds.x + bounds.width - 1, bounds.y, GROUPBOX_LINE_THICK, bounds.height }, 0, BLANK, Fade(GetColor(GuiGetStyle(DEFAULT, (state == GUI_STATE_DISABLED)? BORDER_COLOR_DISABLED : LINE_COLOR)), guiAlpha));
|
||||
|
||||
int borderWidthTemp = GuiGetStyle(DEFAULT, BORDER_WIDTH);
|
||||
|
||||
GuiSetStyle(DEFAULT, BORDER_WIDTH, 1);
|
||||
// Draw split top line with text
|
||||
GuiLine(RAYGUI_CLITERAL(Rectangle) { bounds.x, bounds.y, bounds.width, 1 }, text);
|
||||
|
||||
GuiSetStyle(DEFAULT, BORDER_WIDTH, borderWidthTemp);
|
||||
GuiLine(RAYGUI_CLITERAL(Rectangle){ bounds.x, bounds.y, bounds.width, 1 }, text);
|
||||
//--------------------------------------------------------------------
|
||||
}
|
||||
|
||||
@ -1793,13 +1787,16 @@ int GuiComboBox(Rectangle bounds, const char *text, int active)
|
||||
GuiDrawText(items[active], GetTextBounds(COMBOBOX, bounds), GuiGetStyle(COMBOBOX, TEXT_ALIGNMENT), Fade(GetColor(GuiGetStyle(COMBOBOX, TEXT + (state*3))), guiAlpha));
|
||||
|
||||
// Draw selector using a custom button
|
||||
// NOTE: TEXT_ALIGNMENT forced value
|
||||
// NOTE: BORDER_WIDTH and TEXT_ALIGNMENT forced values
|
||||
int tempBorderWidth = GuiGetStyle(BUTTON, BORDER_WIDTH);
|
||||
int tempTextAlign = GuiGetStyle(BUTTON, TEXT_ALIGNMENT);
|
||||
GuiSetStyle(BUTTON, BORDER_WIDTH, 1);
|
||||
GuiSetStyle(BUTTON, TEXT_ALIGNMENT, GUI_TEXT_ALIGN_CENTER);
|
||||
|
||||
GuiButton(selector, TextFormat("%i/%i", active + 1, itemCount));
|
||||
|
||||
GuiSetStyle(BUTTON, TEXT_ALIGNMENT, tempTextAlign);
|
||||
GuiSetStyle(BUTTON, BORDER_WIDTH, tempBorderWidth);
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
return active;
|
||||
|
Loading…
x
Reference in New Issue
Block a user