From 8ce54d4632f88479703ff2e0bcd2e139074220ad Mon Sep 17 00:00:00 2001 From: David Snopek Date: Mon, 29 Apr 2024 14:49:32 -0500 Subject: [PATCH] Expose `EditorFileDialog::popup_file_dialog()` to GDScript and GDExtension --- doc/classes/EditorFileDialog.xml | 6 ++++++ editor/gui/editor_file_dialog.cpp | 1 + 2 files changed, 7 insertions(+) diff --git a/doc/classes/EditorFileDialog.xml b/doc/classes/EditorFileDialog.xml index 4befcf5e697..d5c2ed55d75 100644 --- a/doc/classes/EditorFileDialog.xml +++ b/doc/classes/EditorFileDialog.xml @@ -90,6 +90,12 @@ Notify the [EditorFileDialog] that its view of the data is no longer accurate. Updates the view contents on next view update. + + + + Shows the [EditorFileDialog] at the default size and position for file dialogs in the editor, and selects the file name if there is a current file. + + diff --git a/editor/gui/editor_file_dialog.cpp b/editor/gui/editor_file_dialog.cpp index a7cdb651456..c12bf5e01f0 100644 --- a/editor/gui/editor_file_dialog.cpp +++ b/editor/gui/editor_file_dialog.cpp @@ -1929,6 +1929,7 @@ void EditorFileDialog::_bind_methods() { ClassDB::bind_method(D_METHOD("set_disable_overwrite_warning", "disable"), &EditorFileDialog::set_disable_overwrite_warning); ClassDB::bind_method(D_METHOD("is_overwrite_warning_disabled"), &EditorFileDialog::is_overwrite_warning_disabled); ClassDB::bind_method(D_METHOD("add_side_menu", "menu", "title"), &EditorFileDialog::add_side_menu, DEFVAL("")); + ClassDB::bind_method(D_METHOD("popup_file_dialog"), &EditorFileDialog::popup_file_dialog); ClassDB::bind_method(D_METHOD("invalidate"), &EditorFileDialog::invalidate);