Review some style formatting

This commit is contained in:
raysan5
2022-01-02 19:33:53 +01:00
parent 24fcac010e
commit 318bc4a747

View File

@ -1332,16 +1332,16 @@ int GuiGetStyle(int control, int property)
// Window Box control // Window Box control
bool GuiWindowBox(Rectangle bounds, const char *title) bool GuiWindowBox(Rectangle bounds, const char *title)
{ {
// Window title bar height (including borders)
// NOTE: This define is also used by GuiMessageBox() and GuiTextInputBox() // NOTE: This define is also used by GuiMessageBox() and GuiTextInputBox()
#if !defined(RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT) #if !defined(RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT)
#define RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT 22 #define RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT 24
#endif #endif
//GuiControlState state = guiState; //GuiControlState state = guiState;
bool clicked = false; bool clicked = false;
int statusBarHeight = RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT + 2*GuiGetStyle(STATUSBAR, BORDER_WIDTH); int statusBarHeight = RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT;
statusBarHeight += (statusBarHeight%2);
Rectangle statusBar = { bounds.x, bounds.y, bounds.width, (float)statusBarHeight }; Rectangle statusBar = { bounds.x, bounds.y, bounds.width, (float)statusBarHeight };
if (bounds.height < statusBarHeight*2.0f) bounds.height = statusBarHeight*2.0f; if (bounds.height < statusBarHeight*2.0f) bounds.height = statusBarHeight*2.0f;
@ -3122,7 +3122,7 @@ int GuiMessageBox(Rectangle bounds, const char *title, const char *message, cons
#define RAYGUI_MESSAGEBOX_BUTTON_HEIGHT 24 #define RAYGUI_MESSAGEBOX_BUTTON_HEIGHT 24
#endif #endif
#if !defined(RAYGUI_MESSAGEBOX_BUTTON_PADDING) #if !defined(RAYGUI_MESSAGEBOX_BUTTON_PADDING)
#define RAYGUI_MESSAGEBOX_BUTTON_PADDING 10 #define RAYGUI_MESSAGEBOX_BUTTON_PADDING 12
#endif #endif
int clicked = -1; // Returns clicked button from buttons list, 0 refers to closed window button int clicked = -1; // Returns clicked button from buttons list, 0 refers to closed window button
@ -3177,7 +3177,7 @@ int GuiTextInputBox(Rectangle bounds, const char *title, const char *message, co
#define RAYGUI_TEXTINPUTBOX_BUTTON_PADDING 10 #define RAYGUI_TEXTINPUTBOX_BUTTON_PADDING 10
#endif #endif
#if !defined(RAYGUI_TEXTINPUTBOX_HEIGHT) #if !defined(RAYGUI_TEXTINPUTBOX_HEIGHT)
#define RAYGUI_TEXTINPUTBOX_HEIGHT 30 #define RAYGUI_TEXTINPUTBOX_HEIGHT 24
#endif #endif
#if !defined(RAYGUI_TEXTINPUTBOX_MAX_TEXT_LENGTH) #if !defined(RAYGUI_TEXTINPUTBOX_MAX_TEXT_LENGTH)
#define RAYGUI_TEXTINPUTBOX_MAX_TEXT_LENGTH 256 #define RAYGUI_TEXTINPUTBOX_MAX_TEXT_LENGTH 256