瀏覽代碼

REVIEWED: Load default style before loading a custom style https://github.com/raysan5/rguistyler/issues/8

Make sure default style has been loaded to avoid overwriting new style properties due to the lazy initialization of default style.
Ray 1 年之前
父節點
當前提交
e3f67f3c02
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      src/raygui.h

+ 1 - 0
src/raygui.h

@@ -3937,6 +3937,7 @@ void GuiLoadStyle(const char *fileName)
     #define MAX_LINE_BUFFER_SIZE    256
     #define MAX_LINE_BUFFER_SIZE    256
 
 
     bool tryBinary = false;
     bool tryBinary = false;
+    if (!guiStyleLoaded) GuiLoadStyleDefault();
 
 
     // Try reading the files as text file first
     // Try reading the files as text file first
     FILE *rgsFile = fopen(fileName, "rt");
     FILE *rgsFile = fopen(fileName, "rt");