fluxxcode / egui-file-dialog

Full featured and customizable file dialog for egui
MIT License
86 stars 11 forks source link

Added &mut option for def file #139

Closed David-OConnor closed 2 months ago

David-OConnor commented 2 months ago

https://github.com/fluxxcode/egui-file-dialog/issues/138

I have found this necessary to set the default file name dynamically, in practice.

fluxxcode commented 2 months ago

Hi, thanks for the PR.

The default file name should be able to be dynamically adjusted via config_mut. Here is an example:

let mut file_dialog = FileDialog::new().default_file_name("some_file.txt");

file_dialog.config_mut().default_file_name = "some_other_file.txt";

Let me know if it works for you!

David-OConnor commented 2 months ago

I can confirm that works. Closing; ty!