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
@ -69,18 +69,19 @@ int main(void)
|
||||
DrawText(directory, 100, 40, 20, DARKGRAY);
|
||||
|
||||
btnBackPressed = GuiButton((Rectangle){ 40.0f, 40.0f, 20, 20 }, "<");
|
||||
|
||||
|
||||
for (int i = 0; i < (int)files.count; i++)
|
||||
{
|
||||
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}, ""))
|
||||
{
|
||||
strcpy(directory, files.paths[i]);
|
||||
UnloadDirectoryFiles(files);
|
||||
files = LoadDirectoryFiles(directory);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user