raygui
raygui copied to clipboard
Fix Custom File Dialog
It's currently not listing the files in the dialog itself.
I have the same problem, some fix?
I believe it's something to do with the filters over at https://github.com/raysan5/raygui/blob/master/examples/custom_file_dialog/gui_file_dialog.h#L410 . I haven't done some investigation beyond the initial port to 4.2.
I have fixed the filters and other stuff to be aligned for my project, here is my fix maybe it can be helpful :)
That's great work, @nicofretti! Would you mind submitting it as a Pull Request? If not, I'd be happy to submit it on your behalf 😁
Thank you @RobLoach, my solution uses some C++ features so I think that needs to be modified before the Pull Request. So I can try to open a PR and then we can check the result... or if you prefer to open and fix them for me is the same :D
Has anyone found a solution to the listview control not displaying the files? Info at #235
Also I have tried #define USE_CUSTOM_LISTVIEW_FILEINFO but this is a different set of errors.
Update:
Using Win10 GCC 9.2.0 (Static raylib)
I tidied @nicofretti C++ version to C. It does show the png file in listview, but no other files or directory traversal.
Maybe I don't understand raylib/raygui and this is my problem.
I thought a GUI file dialog "File select/open" and "File save to directory" would be a useful addition for raygui as I can't currently use native Windows API dialogs with raylib due to function naming conflicts, but this example seams to be alpha or broken :(
At some point I will look at this "gui_file_dialog.h" and see if I can implement a basic file open/save with filters, but for the moment I have too much other tasks in the background to get through, so maybe in a month or 2.
Here is the 2 current source files I have tried: custom_file_dialog.c.txt gui_file_dialog.h.txt Makefile.win.txt
P.S. "USE_CUSTOM_LISTVIEW_FILEINFO' is still giving error 260 77 W:__Dev_Projects_Active\RaylibTests\C\gui_file_dialog.h [Error] incompatible types when assigning to type 'FileInfo' {aka 'struct FileInfo'} from type 'char *'
Fixed... but still requires some work...