瀏覽代碼

Addressed issue #66

NOTE: GetDirectoryPath() has also been updated in raylib, latest master branch version must be used!
Ray 5 年之前
父節點
當前提交
4fb2b73a15
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      src/raygui.h

+ 5 - 0
src/raygui.h

@@ -804,6 +804,11 @@ void GuiSetFont(Font font)
 {
     if (font.texture.id > 0)
     {
+        // NOTE: If we try to setup a font but default style has not been
+        // lazily loaded before, it will be overwritten, so we need to force
+        // default style loading first
+        if (!guiStyleLoaded) GuiLoadStyleDefault();
+
         guiFont = font;
         GuiSetStyle(DEFAULT, TEXT_SIZE, font.baseSize);
     }