From 18e27a002089c1cea838e4dfc66aa7ba89da4cfe Mon Sep 17 00:00:00 2001 From: Ray Date: Wed, 31 Oct 2018 13:26:59 +0100 Subject: [PATCH] Corrected detail for compilation with C++ --- src/raygui.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/raygui.h b/src/raygui.h index 470b291..185ba7b 100644 --- a/src/raygui.h +++ b/src/raygui.h @@ -470,7 +470,7 @@ static float guiAlpha = 1.0f; static Font guiFont = { 0 }; // Current GUI style (light or dark) -static int style[NUM_PROPERTIES] = { +static unsigned int style[NUM_PROPERTIES] = { #if defined(RAYGUI_STYLE_DEFAULT_LIGHT) //---------------------------------------------- 0xf5f5f5ff, // DEFAULT_BACKGROUND_COLOR @@ -2006,7 +2006,7 @@ RAYGUIDEF bool GuiTextBox(Rectangle bounds, char *text, int textSize, bool editM if (keyCount < (textSize - 1)) { int maxWidth = (bounds.width - (DEFAULT_TEXT_PADDING*2)); - if (GuiTextWidth(text) < maxWidth - style[DEFAULT_TEXT_SIZE]) + if (GuiTextWidth(text) < (maxWidth - style[DEFAULT_TEXT_SIZE])) { if ((key >= 32) && (key <= 125)) { @@ -2812,8 +2812,6 @@ static bool GuiListElement(Rectangle bounds, const char *text, bool active, bool GuiControlState state = guiState; - bool pressed = false; - int textWidth = GuiTextWidth(text); int textHeight = style[DEFAULT_TEXT_SIZE];