Skip to content

Commit

Permalink
Update rguistyler.c
Browse files Browse the repository at this point in the history
  • Loading branch information
raysan5 committed Sep 20, 2023
1 parent 610fdce commit ecff328
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/rguistyler.c
Original file line number Diff line number Diff line change
Expand Up @@ -1465,6 +1465,7 @@ int main(int argc, char *argv[])
{
// Save file: outFileName
// Check for valid extension and make sure it is
if (outFileName[0] == '\0') strcpy(outFileName, "style.rgs"); // Check for empty name
if ((GetFileExtension(outFileName) == NULL) || !IsFileExtension(outFileName, ".rgs")) strcat(outFileName, ".rgs\0");

// Save style file (text or binary)
Expand Down Expand Up @@ -1494,6 +1495,8 @@ int main(int argc, char *argv[])
//int result = GuiFileDialog(DIALOG_TEXTINPUT, "Export raygui style file...", outFileName, "Ok;Cancel", NULL);
int result = GuiTextInputBox((Rectangle){ screenWidth/2 - 280/2, screenHeight/2 - 112/2 - 60, 280, 112 }, "#7#Export raygui style file...", NULL, "#7#Export", outFileName, 512, NULL);
#else
if (outFileName[0] == '\0') strcpy(outFileName, "style"); // Check for empty name

// Consider different supported file types
char filters[64] = { 0 };
strcpy(outFileName, TextToLower(currentStyleName));
Expand Down Expand Up @@ -1584,6 +1587,7 @@ int main(int argc, char *argv[])
{
// Save file: outFileName
// Check for valid extension and make sure it is
if (outFileName[0] == '\0') strcpy(outFileName, "style_font.png"); // Check for empty name
if ((GetFileExtension(outFileName) == NULL) || !IsFileExtension(outFileName, ".png")) strcat(outFileName, ".png\0");

Image image = LoadImageFromTexture(windowFontAtlasState.texFont);
Expand Down

0 comments on commit ecff328

Please sign in to comment.