From e3f67f3c02300bf927a343d767d51b9b1ffe41a9 Mon Sep 17 00:00:00 2001 From: Ray Date: Wed, 3 Apr 2024 18:27:24 +0200 Subject: [PATCH] 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. --- src/raygui.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/raygui.h b/src/raygui.h index a5b9e332..d6223de8 100644 --- a/src/raygui.h +++ b/src/raygui.h @@ -3937,6 +3937,7 @@ void GuiLoadStyle(const char *fileName) #define MAX_LINE_BUFFER_SIZE 256 bool tryBinary = false; + if (!guiStyleLoaded) GuiLoadStyleDefault(); // Try reading the files as text file first FILE *rgsFile = fopen(fileName, "rt");