raygui icon indicating copy to clipboard operation
raygui copied to clipboard

Fix Custom File Dialog

Open RobLoach opened this issue 3 years ago • 5 comments
trafficstars

It's currently not listing the files in the dialog itself.

RobLoach avatar Aug 27 '22 20:08 RobLoach

I have the same problem, some fix?

nicofretti avatar Sep 13 '22 17:09 nicofretti

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.

RobLoach avatar Sep 13 '22 17:09 RobLoach

I have fixed the filters and other stuff to be aligned for my project, here is my fix maybe it can be helpful :)

nicofretti avatar Sep 13 '22 19:09 nicofretti

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 😁

RobLoach avatar Sep 13 '22 21:09 RobLoach

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

nicofretti avatar Sep 13 '22 22:09 nicofretti

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.

Axle-Ozz-i-sofT avatar Oct 26 '22 00:10 Axle-Ozz-i-sofT

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. CustomFileDialog_nicof 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 *'

Axle-Ozz-i-sofT avatar Oct 26 '22 02:10 Axle-Ozz-i-sofT

Fixed... but still requires some work...

raysan5 avatar Nov 07 '22 11:11 raysan5