mirror of
https://github.com/raysan5/raygui.git
synced 2025-12-25 10:22:33 -05:00
Updated examples to new raylib 4.2 files API
This commit is contained in:
@ -141,14 +141,13 @@ int main(int argc, char **argv)
|
||||
// Fonts drag & drop logic
|
||||
if (IsFileDropped())
|
||||
{
|
||||
int count = 0;
|
||||
char **files = LoadDroppedFiles(&count);
|
||||
FilePathList droppedFiles = LoadDroppedFiles();
|
||||
|
||||
if (IsFileExtension(files[0], ".ttf") ||
|
||||
IsFileExtension(files[0], ".otf") ||
|
||||
IsFileExtension(files[0], ".fnt"))
|
||||
if (IsFileExtension(droppedFiles.paths[0], ".ttf") ||
|
||||
IsFileExtension(droppedFiles.paths[0], ".otf") ||
|
||||
IsFileExtension(droppedFiles.paths[0], ".fnt"))
|
||||
{
|
||||
Font fnt = LoadFont(files[0]);
|
||||
Font fnt = LoadFont(droppedFiles.paths[0]);
|
||||
|
||||
if (fnt.texture.id != 0)
|
||||
{
|
||||
@ -162,7 +161,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
UnloadDroppedFiles();
|
||||
UnloadDroppedFiles(droppedFiles);
|
||||
}
|
||||
|
||||
// Convert text to hex representation and draw it on screen
|
||||
|
||||
Reference in New Issue
Block a user