-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Windows] Implement native file selection dialog support. #79574
Conversation
The passthrough option from the DisplayServer.file_dialog_show("Hello!", ".", "", false, DisplayServer.FILE_DIALOG_MODE_OPEN_ANY, [], _callback)
DisplayServer.file_dialog_show("Hello!", "res://", "", false, DisplayServer.FILE_DIALOG_MODE_OPEN_ANY, [], _callback)
DisplayServer.file_dialog_show("Hello!", ProjectSettings.globalize_path("res://"), "", false, DisplayServer.FILE_DIALOG_MODE_OPEN_ANY, [], _callback)
DisplayServer.file_dialog_show("Hello!", "C:/", "", false, DisplayServer.FILE_DIALOG_MODE_OPEN_ANY, [], _callback)
DisplayServer.file_dialog_show("Hello!", "C:\\", "", false, DisplayServer.FILE_DIALOG_MODE_OPEN_ANY, [], _callback) It always opens the user directory instead. Windows 11 by the way. |
Tested on Windows 10, I also can't change current directory. EDIT: |
Setting directory should be fixes. |
Thanks! |
And what about the unresponsive background window? 🙃 |
I think that might be by design? Isn't it always blocking the main window when a native app brings that dialog? But feel free to open the issue. |
Have not seen the edit, the function is blocking, and I am not sure if there's a way to plug in redraw into its modal event loop. But I dialog can be shown from a thread, I'll take a look if it can be improved. |
I checked how Chrome handles it. When you click outside the dialog, the dialog will briefly blink and play the Background sound. EDIT: |
Follow up to #47499
Implements
DisplayServer.file_dialog_show()
for Windows.