mirror of
https://github.com/raysan5/raylib.git
synced 2025-12-06 06:13:10 +00:00
[examples] core_directory_files fixes (#5343)
* [examples] reset on folder click `continue` after clicking a new folder * [examples] don't make non-directories clickable `IsPathFile` is not enough to check if it's a directory since it also takes in char devices. * rlparser: update raylib_api.* by CI * Delete tools/rlparser/rlparser --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Ray <raysan5@gmail.com>
This commit is contained in:
parent
2a324ace27
commit
d7a7eda959
@ -74,13 +74,14 @@ int main(void)
|
|||||||
{
|
{
|
||||||
Color color = Fade(LIGHTGRAY, 0.3f);
|
Color color = Fade(LIGHTGRAY, 0.3f);
|
||||||
|
|
||||||
if (!IsPathFile(files.paths[i]))
|
if (!IsPathFile(files.paths[i]) && DirectoryExists(files.paths[i]))
|
||||||
{
|
{
|
||||||
if (GuiButton((Rectangle){0.0f, 85.0f + 40.0f*(float)i, screenWidth, 40}, ""))
|
if (GuiButton((Rectangle){0.0f, 85.0f + 40.0f*(float)i, screenWidth, 40}, ""))
|
||||||
{
|
{
|
||||||
strcpy(directory, files.paths[i]);
|
strcpy(directory, files.paths[i]);
|
||||||
UnloadDirectoryFiles(files);
|
UnloadDirectoryFiles(files);
|
||||||
files = LoadDirectoryFiles(directory);
|
files = LoadDirectoryFiles(directory);
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user