mirror of
https://github.com/raysan5/raygui.git
synced 2026-01-29 02:09:17 -05:00
Update raygui.h
This commit is contained in:
@ -3799,12 +3799,12 @@ void GuiLoadStyle(const char *fileName)
|
|||||||
|
|
||||||
if (fileDataSize > 0)
|
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);
|
fread(fileData, sizeof(unsigned char), fileDataSize, rgsFile);
|
||||||
|
|
||||||
GuiLoadStyleFromMemory(fileData, fileDataSize);
|
GuiLoadStyleFromMemory(fileData, fileDataSize);
|
||||||
|
|
||||||
RL_FREE(fileData);
|
RAYGUI_FREE(fileData);
|
||||||
}
|
}
|
||||||
|
|
||||||
fclose(rgsFile);
|
fclose(rgsFile);
|
||||||
@ -3899,6 +3899,7 @@ void GuiLoadStyleDefault(void)
|
|||||||
|
|
||||||
// NOTE: Default raylib font character 95 is a white square
|
// NOTE: Default raylib font character 95 is a white square
|
||||||
Rectangle whiteChar = guiFont.recs[95];
|
Rectangle whiteChar = guiFont.recs[95];
|
||||||
|
|
||||||
// NOTE: We set up a 1px padding on char rectangle to avoid pixel bleeding on MSAA filtering
|
// 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 });
|
SetShapesTexture(guiFont.texture, RAYGUI_CLITERAL(Rectangle){ whiteChar.x + 1, whiteChar.y + 1, whiteChar.width - 2, whiteChar.height - 2 });
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user