浏览代码

Update raygui.h (#317)

Hanaxar 2 年之前
父节点
当前提交
3d20f06bf2
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/raygui.h

+ 1 - 1
src/raygui.h

@@ -3510,7 +3510,7 @@ int GuiMessageBox(Rectangle bounds, const char *title, const char *message, cons
     buttonBounds.width = (bounds.width - RAYGUI_MESSAGEBOX_BUTTON_PADDING*(buttonCount + 1))/buttonCount;
     buttonBounds.width = (bounds.width - RAYGUI_MESSAGEBOX_BUTTON_PADDING*(buttonCount + 1))/buttonCount;
     buttonBounds.height = RAYGUI_MESSAGEBOX_BUTTON_HEIGHT;
     buttonBounds.height = RAYGUI_MESSAGEBOX_BUTTON_HEIGHT;
 
 
-    int textWidth = GetTextWidth(message);
+    int textWidth = GetTextWidth(message) + 2;
 
 
     Rectangle textBounds = { 0 };
     Rectangle textBounds = { 0 };
     textBounds.x = bounds.x + bounds.width/2 - textWidth/2;
     textBounds.x = bounds.x + bounds.width/2 - textWidth/2;