You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-22 15:06:45 +00:00
New Quick Open Dialog
- Updated list view with thumbnails, and separate file name.
- Added a grid view which has larger icons.
- Added toggle to filter out files from addons.
- Store history for each opened resource type.
New Editor settings for Quick Open:
- Startup display mode (grid or list):
- Determined by the requested resource type.
- Whatever was last used.
- Toggle to filter out files from addons (for persistence).
Notes
- The dialog is now created once in EditorNode, and globally available for other components.
- A fixed number of result scenes are instantiated, and reused based on query.
- Drop support for multiselect.
This commit is contained in:
@@ -33,12 +33,12 @@
|
||||
#include "editor/audio_stream_preview.h"
|
||||
#include "editor/editor_help.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_quick_open.h"
|
||||
#include "editor/editor_resource_preview.h"
|
||||
#include "editor/editor_settings.h"
|
||||
#include "editor/editor_string_names.h"
|
||||
#include "editor/filesystem_dock.h"
|
||||
#include "editor/gui/editor_file_dialog.h"
|
||||
#include "editor/gui/editor_quick_open_dialog.h"
|
||||
#include "editor/plugins/editor_resource_conversion_plugin.h"
|
||||
#include "editor/plugins/script_editor_plugin.h"
|
||||
#include "editor/scene_tree_dock.h"
|
||||
@@ -171,10 +171,6 @@ void EditorResourcePicker::_file_selected(const String &p_path) {
|
||||
_update_resource();
|
||||
}
|
||||
|
||||
void EditorResourcePicker::_file_quick_selected() {
|
||||
_file_selected(quick_open->get_selected());
|
||||
}
|
||||
|
||||
void EditorResourcePicker::_resource_saved(Object *p_resource) {
|
||||
if (edited_resource.is_valid() && p_resource == edited_resource.ptr()) {
|
||||
emit_signal(SNAME("resource_changed"), edited_resource);
|
||||
@@ -339,14 +335,14 @@ void EditorResourcePicker::_edit_menu_cbk(int p_which) {
|
||||
} break;
|
||||
|
||||
case OBJ_MENU_QUICKLOAD: {
|
||||
if (!quick_open) {
|
||||
quick_open = memnew(EditorQuickOpen);
|
||||
add_child(quick_open);
|
||||
quick_open->connect("quick_open", callable_mp(this, &EditorResourcePicker::_file_quick_selected));
|
||||
const Vector<String> &base_types_string = base_type.split(",");
|
||||
|
||||
Vector<StringName> base_types;
|
||||
for (const String &type : base_types_string) {
|
||||
base_types.push_back(type);
|
||||
}
|
||||
|
||||
quick_open->popup_dialog(base_type);
|
||||
quick_open->set_title(TTR("Resource"));
|
||||
EditorNode::get_singleton()->get_quick_open_dialog()->popup_dialog(base_types, callable_mp(this, &EditorResourcePicker::_file_selected));
|
||||
} break;
|
||||
|
||||
case OBJ_MENU_INSPECT: {
|
||||
|
||||
Reference in New Issue
Block a user