Update raygui.h

This commit is contained in:
Ray
2023-07-09 09:39:53 +02:00
parent 9a3ba8ba1f
commit 8041f9d3d7

View File

@ -3799,12 +3799,12 @@ void GuiLoadStyle(const char *fileName)
if (fileDataSize > 0)
{
unsigned char *fileData = (unsigned char *)RL_MALLOC(fileDataSize*sizeof(unsigned char));
unsigned char *fileData = (unsigned char *)RAYGUI_MALLOC(fileDataSize*sizeof(unsigned char));
fread(fileData, sizeof(unsigned char), fileDataSize, rgsFile);
GuiLoadStyleFromMemory(fileData, fileDataSize);
RL_FREE(fileData);
RAYGUI_FREE(fileData);
}
fclose(rgsFile);
@ -3899,6 +3899,7 @@ void GuiLoadStyleDefault(void)
// NOTE: Default raylib font character 95 is a white square
Rectangle whiteChar = guiFont.recs[95];
// NOTE: We set up a 1px padding on char rectangle to avoid pixel bleeding on MSAA filtering
SetShapesTexture(guiFont.texture, RAYGUI_CLITERAL(Rectangle){ whiteChar.x + 1, whiteChar.y + 1, whiteChar.width - 2, whiteChar.height - 2 });
}