diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/action_map_editor.cpp | 13 | ||||
-rw-r--r-- | editor/action_map_editor.h | 3 | ||||
-rw-r--r-- | editor/editor_inspector.cpp | 107 | ||||
-rw-r--r-- | editor/editor_inspector.h | 2 | ||||
-rw-r--r-- | editor/editor_layouts_dialog.cpp | 12 | ||||
-rw-r--r-- | editor/editor_node.cpp | 4 | ||||
-rw-r--r-- | editor/find_in_files.cpp | 19 | ||||
-rw-r--r-- | editor/import/scene_import_settings.cpp | 6 | ||||
-rw-r--r-- | editor/plugins/version_control_editor_plugin.cpp | 45 | ||||
-rw-r--r-- | editor/plugins/version_control_editor_plugin.h | 5 | ||||
-rw-r--r-- | editor/project_settings_editor.cpp | 10 | ||||
-rw-r--r-- | editor/project_settings_editor.h | 3 |
12 files changed, 111 insertions, 118 deletions
diff --git a/editor/action_map_editor.cpp b/editor/action_map_editor.cpp index c376d5434f..a1e4b5fde4 100644 --- a/editor/action_map_editor.cpp +++ b/editor/action_map_editor.cpp @@ -35,6 +35,7 @@ #include "editor/input_event_configuration_dialog.h" #include "scene/gui/check_button.h" #include "scene/gui/tree.h" +#include "scene/scene_string_names.h" static bool _is_action_name_valid(const String &p_name) { const char32_t *cstr = p_name.get_data(); @@ -362,6 +363,8 @@ void ActionMapEditor::_bind_methods() { ADD_SIGNAL(MethodInfo("action_removed", PropertyInfo(Variant::STRING, "name"))); ADD_SIGNAL(MethodInfo("action_renamed", PropertyInfo(Variant::STRING, "old_name"), PropertyInfo(Variant::STRING, "new_name"))); ADD_SIGNAL(MethodInfo("action_reordered", PropertyInfo(Variant::STRING, "action_name"), PropertyInfo(Variant::STRING, "relative_to"), PropertyInfo(Variant::BOOL, "before"))); + ADD_SIGNAL(MethodInfo(SNAME("filter_focused"))); + ADD_SIGNAL(MethodInfo(SNAME("filter_unfocused"))); } LineEdit *ActionMapEditor::get_search_box() const { @@ -492,6 +495,14 @@ void ActionMapEditor::use_external_search_box(LineEdit *p_searchbox) { action_list_search->connect("text_changed", callable_mp(this, &ActionMapEditor::_search_term_updated)); } +void ActionMapEditor::_on_filter_focused() { + emit_signal(SNAME("filter_focused")); +} + +void ActionMapEditor::_on_filter_unfocused() { + emit_signal(SNAME("filter_unfocused")); +} + ActionMapEditor::ActionMapEditor() { // Main Vbox Container VBoxContainer *main_vbox = memnew(VBoxContainer); @@ -512,6 +523,8 @@ ActionMapEditor::ActionMapEditor() { action_list_search_by_event->set_h_size_flags(Control::SIZE_EXPAND_FILL); action_list_search_by_event->set_stretch_ratio(0.75); action_list_search_by_event->connect("event_changed", callable_mp(this, &ActionMapEditor::_search_by_event)); + action_list_search_by_event->connect(SceneStringNames::get_singleton()->focus_entered, callable_mp(this, &ActionMapEditor::_on_filter_focused)); + action_list_search_by_event->connect(SceneStringNames::get_singleton()->focus_exited, callable_mp(this, &ActionMapEditor::_on_filter_unfocused)); top_hbox->add_child(action_list_search_by_event); Button *clear_all_search = memnew(Button); diff --git a/editor/action_map_editor.h b/editor/action_map_editor.h index ad9980c4ef..1908805b17 100644 --- a/editor/action_map_editor.h +++ b/editor/action_map_editor.h @@ -106,6 +106,9 @@ private: bool can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const; void drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from); + void _on_filter_focused(); + void _on_filter_unfocused(); + protected: void _notification(int p_what); static void _bind_methods(); diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index 5bf45687ab..e2ed264645 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -1172,6 +1172,36 @@ void EditorInspectorSection::_test_unfold() { } } +Ref<Texture2D> EditorInspectorSection::_get_arrow() { + Ref<Texture2D> arrow; + if (foldable) { + if (object->editor_is_section_unfolded(section)) { + arrow = get_theme_icon(SNAME("arrow"), SNAME("Tree")); + } else { + if (is_layout_rtl()) { + arrow = get_theme_icon(SNAME("arrow_collapsed_mirrored"), SNAME("Tree")); + } else { + arrow = get_theme_icon(SNAME("arrow_collapsed"), SNAME("Tree")); + } + } + } + return arrow; +} + +int EditorInspectorSection::_get_header_height() { + Ref<Font> font = get_theme_font(SNAME("bold"), SNAME("EditorFonts")); + int font_size = get_theme_font_size(SNAME("bold_size"), SNAME("EditorFonts")); + + int header_height = font->get_height(font_size); + Ref<Texture2D> arrow = _get_arrow(); + if (arrow.is_valid()) { + header_height = MAX(header_height, arrow->get_height()); + } + header_height += get_theme_constant(SNAME("v_separation"), SNAME("Tree")); + + return header_height; +} + void EditorInspectorSection::_notification(int p_what) { switch (p_what) { case NOTIFICATION_THEME_CHANGED: { @@ -1182,30 +1212,6 @@ void EditorInspectorSection::_notification(int p_what) { if (!vbox_added) { return; } - // Get the section header font. - Ref<Font> font = get_theme_font(SNAME("bold"), SNAME("EditorFonts")); - int font_size = get_theme_font_size(SNAME("bold_size"), SNAME("EditorFonts")); - - // Get the right direction arrow texture, if the section is foldable. - Ref<Texture2D> arrow; - if (foldable) { - if (object->editor_is_section_unfolded(section)) { - arrow = get_theme_icon(SNAME("arrow"), SNAME("Tree")); - } else { - if (is_layout_rtl()) { - arrow = get_theme_icon(SNAME("arrow_collapsed_mirrored"), SNAME("Tree")); - } else { - arrow = get_theme_icon(SNAME("arrow_collapsed"), SNAME("Tree")); - } - } - } - - // Compute the height of the section header. - int header_height = font->get_height(font_size); - if (arrow.is_valid()) { - header_height = MAX(header_height, arrow->get_height()); - } - header_height += get_theme_constant(SNAME("v_separation"), SNAME("Tree")); int inspector_margin = get_theme_constant(SNAME("inspector_margin"), SNAME("Editor")); int section_indent_size = get_theme_constant(SNAME("indent_size"), SNAME("EditorInspectorSection")); @@ -1218,6 +1224,7 @@ void EditorInspectorSection::_notification(int p_what) { } Size2 size = get_size() - Vector2(inspector_margin, 0); + int header_height = _get_header_height(); Vector2 offset = Vector2(is_layout_rtl() ? 0 : inspector_margin, header_height); for (int i = 0; i < get_child_count(); i++) { Control *c = Object::cast_to<Control>(get_child(i)); @@ -1233,36 +1240,6 @@ void EditorInspectorSection::_notification(int p_what) { } break; case NOTIFICATION_DRAW: { - // Get the section header font. - Ref<Font> font = get_theme_font(SNAME("bold"), SNAME("EditorFonts")); - int font_size = get_theme_font_size(SNAME("bold_size"), SNAME("EditorFonts")); - Color font_color = get_theme_color(SNAME("font_color"), SNAME("Editor")); - - // Get the right direction arrow texture, if the section is foldable. - Ref<Texture2D> arrow; - bool folded = foldable; - if (foldable) { - if (object->editor_is_section_unfolded(section)) { - arrow = get_theme_icon(SNAME("arrow"), SNAME("Tree")); - folded = false; - } else { - if (is_layout_rtl()) { - arrow = get_theme_icon(SNAME("arrow_collapsed_mirrored"), SNAME("Tree")); - } else { - arrow = get_theme_icon(SNAME("arrow_collapsed"), SNAME("Tree")); - } - } - } - - bool rtl = is_layout_rtl(); - - // Compute the height and width of the section header. - int header_height = font->get_height(font_size); - if (arrow.is_valid()) { - header_height = MAX(header_height, arrow->get_height()); - } - header_height += get_theme_constant(SNAME("v_separation"), SNAME("Tree")); - int section_indent = 0; int section_indent_size = get_theme_constant(SNAME("indent_size"), SNAME("EditorInspectorSection")); if (indent_depth > 0 && section_indent_size > 0) { @@ -1275,11 +1252,13 @@ void EditorInspectorSection::_notification(int p_what) { int header_width = get_size().width - section_indent; int header_offset_x = 0.0; + bool rtl = is_layout_rtl(); if (!rtl) { header_offset_x += section_indent; } // Draw header area. + int header_height = _get_header_height(); Rect2 header_rect = Rect2(Vector2(header_offset_x, 0.0), Vector2(header_width, header_height)); Color c = bg_color; c.a *= 0.4; @@ -1288,7 +1267,7 @@ void EditorInspectorSection::_notification(int p_what) { } draw_rect(header_rect, c); - // Draw header title, folding arrow and coutn of revertable properties. + // Draw header title, folding arrow and count of revertable properties. { int separation = Math::round(2 * EDSCALE); @@ -1296,6 +1275,7 @@ void EditorInspectorSection::_notification(int p_what) { int margin_end = separation; // - Arrow. + Ref<Texture2D> arrow = _get_arrow(); if (arrow.is_valid()) { Point2 arrow_position; if (rtl) { @@ -1313,6 +1293,13 @@ void EditorInspectorSection::_notification(int p_what) { // - Count of revertable properties. String num_revertable_str; int num_revertable_width = 0; + + bool folded = foldable && !object->editor_is_section_unfolded(section); + + Ref<Font> font = get_theme_font(SNAME("bold"), SNAME("EditorFonts")); + int font_size = get_theme_font_size(SNAME("bold_size"), SNAME("EditorFonts")); + Color font_color = get_theme_color(SNAME("font_color"), SNAME("Editor")); + if (folded && revertable_properties.size()) { int label_width = font->get_string_size(label, HORIZONTAL_ALIGNMENT_LEFT, available, font_size, TextServer::JUSTIFICATION_KASHIDA | TextServer::JUSTIFICATION_CONSTRAIN_ELLIPSIS).x; @@ -1481,10 +1468,12 @@ void EditorInspectorSection::gui_input(const Ref<InputEvent> &p_event) { Ref<InputEventMouseButton> mb = p_event; if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MouseButton::LEFT) { - Ref<Font> font = get_theme_font(SNAME("font"), SNAME("Tree")); - int font_size = get_theme_font_size(SNAME("font_size"), SNAME("Tree")); - if (mb->get_position().y > font->get_height(font_size)) { //clicked outside - return; + if (object->editor_is_section_unfolded(section)) { + int header_height = _get_header_height(); + + if (mb->get_position().y >= header_height) { + return; + } } accept_event(); diff --git a/editor/editor_inspector.h b/editor/editor_inspector.h index 56d0a55319..53490f0880 100644 --- a/editor/editor_inspector.h +++ b/editor/editor_inspector.h @@ -280,6 +280,8 @@ class EditorInspectorSection : public Container { HashSet<StringName> revertable_properties; void _test_unfold(); + int _get_header_height(); + Ref<Texture2D> _get_arrow(); protected: Object *object = nullptr; diff --git a/editor/editor_layouts_dialog.cpp b/editor/editor_layouts_dialog.cpp index 886e29a504..19b137c7fd 100644 --- a/editor/editor_layouts_dialog.cpp +++ b/editor/editor_layouts_dialog.cpp @@ -33,6 +33,7 @@ #include "core/io/config_file.h" #include "core/object/class_db.h" #include "core/os/keyboard.h" +#include "editor/editor_scale.h" #include "editor/editor_settings.h" #include "scene/gui/item_list.h" #include "scene/gui/line_edit.h" @@ -97,6 +98,11 @@ void EditorLayoutsDialog::_post_popup() { for (const String &E : layouts) { layout_names->add_item(E); } + if (name->is_visible()) { + name->grab_focus(); + } else { + layout_names->grab_focus(); + } } EditorLayoutsDialog::EditorLayoutsDialog() { @@ -106,7 +112,9 @@ EditorLayoutsDialog::EditorLayoutsDialog() { makevb->set_anchor_and_offset(SIDE_RIGHT, Control::ANCHOR_END, -5); layout_names = memnew(ItemList); - makevb->add_child(layout_names); + layout_names->set_auto_height(true); + makevb->add_margin_child(TTR("Select existing layout:"), layout_names); + layout_names->set_custom_minimum_size(Size2(300 * EDSCALE, 1)); layout_names->set_visible(true); layout_names->set_offset(SIDE_TOP, 5); layout_names->set_anchor_and_offset(SIDE_LEFT, Control::ANCHOR_BEGIN, 5); @@ -116,8 +124,10 @@ EditorLayoutsDialog::EditorLayoutsDialog() { layout_names->set_allow_rmb_select(true); name = memnew(LineEdit); + name->set_placeholder("Or enter new layout name"); makevb->add_child(name); name->set_offset(SIDE_TOP, 5); + name->set_custom_minimum_size(Size2(300 * EDSCALE, 1)); name->set_anchor_and_offset(SIDE_LEFT, Control::ANCHOR_BEGIN, 5); name->set_anchor_and_offset(SIDE_RIGHT, Control::ANCHOR_END, -5); name->connect("gui_input", callable_mp(this, &EditorLayoutsDialog::_line_gui_input)); diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index a70a40c5a1..0c75a36c7d 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -5194,15 +5194,15 @@ void EditorNode::_layout_menu_option(int p_id) { current_menu_option = p_id; layout_dialog->set_title(TTR("Save Layout")); layout_dialog->set_ok_button_text(TTR("Save")); - layout_dialog->popup_centered(); layout_dialog->set_name_line_enabled(true); + layout_dialog->popup_centered(); } break; case SETTINGS_LAYOUT_DELETE: { current_menu_option = p_id; layout_dialog->set_title(TTR("Delete Layout")); layout_dialog->set_ok_button_text(TTR("Delete")); - layout_dialog->popup_centered(); layout_dialog->set_name_line_enabled(false); + layout_dialog->popup_centered(); } break; case SETTINGS_LAYOUT_DEFAULT: { _load_docks_from_config(default_layout, "docks"); diff --git a/editor/find_in_files.cpp b/editor/find_in_files.cpp index b7e7200b11..3a6c891142 100644 --- a/editor/find_in_files.cpp +++ b/editor/find_in_files.cpp @@ -569,8 +569,6 @@ FindInFilesPanel::FindInFilesPanel() { hbc->add_child(find_label); _search_text_label = memnew(Label); - _search_text_label->add_theme_font_override("font", EditorNode::get_singleton()->get_gui_base()->get_theme_font(SNAME("source"), SNAME("EditorFonts"))); - _search_text_label->add_theme_font_size_override("font_size", EditorNode::get_singleton()->get_gui_base()->get_theme_font_size(SNAME("source_size"), SNAME("EditorFonts"))); hbc->add_child(_search_text_label); _progress_bar = memnew(ProgressBar); @@ -598,8 +596,6 @@ FindInFilesPanel::FindInFilesPanel() { } _results_display = memnew(Tree); - _results_display->add_theme_font_override("font", EditorNode::get_singleton()->get_gui_base()->get_theme_font(SNAME("source"), SNAME("EditorFonts"))); - _results_display->add_theme_font_size_override("font_size", EditorNode::get_singleton()->get_gui_base()->get_theme_font_size(SNAME("source_size"), SNAME("EditorFonts"))); _results_display->set_v_size_flags(SIZE_EXPAND_FILL); _results_display->connect("item_selected", callable_mp(this, &FindInFilesPanel::_on_result_selected)); _results_display->connect("item_edited", callable_mp(this, &FindInFilesPanel::_on_item_edited)); @@ -688,13 +684,20 @@ void FindInFilesPanel::stop_search() { void FindInFilesPanel::_notification(int p_what) { switch (p_what) { - case NOTIFICATION_PROCESS: { - _progress_bar->set_as_ratio(_finder->get_progress()); - } break; - case NOTIFICATION_THEME_CHANGED: { _search_text_label->add_theme_font_override("font", get_theme_font(SNAME("source"), SNAME("EditorFonts"))); + _search_text_label->add_theme_font_size_override("font_size", get_theme_font_size(SNAME("source_size"), SNAME("EditorFonts"))); _results_display->add_theme_font_override("font", get_theme_font(SNAME("source"), SNAME("EditorFonts"))); + _results_display->add_theme_font_size_override("font_size", get_theme_font_size(SNAME("source_size"), SNAME("EditorFonts"))); + + // Rebuild search tree. + if (!_finder->get_search_text().is_empty()) { + start_search(); + } + } break; + + case NOTIFICATION_PROCESS: { + _progress_bar->set_as_ratio(_finder->get_progress()); } break; } } diff --git a/editor/import/scene_import_settings.cpp b/editor/import/scene_import_settings.cpp index 1e406e6d17..380a4e370c 100644 --- a/editor/import/scene_import_settings.cpp +++ b/editor/import/scene_import_settings.cpp @@ -958,15 +958,15 @@ void SceneImportSettings::_notification(int p_what) { void SceneImportSettings::_menu_callback(int p_id) { switch (p_id) { case ACTION_EXTRACT_MATERIALS: { - save_path->set_text(TTR("Select folder to extract material resources")); + save_path->set_title(TTR("Select folder to extract material resources")); external_extension_type->select(0); } break; case ACTION_CHOOSE_MESH_SAVE_PATHS: { - save_path->set_text(TTR("Select folder where mesh resources will save on import")); + save_path->set_title(TTR("Select folder where mesh resources will save on import")); external_extension_type->select(1); } break; case ACTION_CHOOSE_ANIMATION_SAVE_PATHS: { - save_path->set_text(TTR("Select folder where animations will save on import")); + save_path->set_title(TTR("Select folder where animations will save on import")); external_extension_type->select(1); } break; } diff --git a/editor/plugins/version_control_editor_plugin.cpp b/editor/plugins/version_control_editor_plugin.cpp index f7fb211014..f54bebfd8e 100644 --- a/editor/plugins/version_control_editor_plugin.cpp +++ b/editor/plugins/version_control_editor_plugin.cpp @@ -58,12 +58,10 @@ void VersionControlEditorPlugin::_create_vcs_metadata_files() { void VersionControlEditorPlugin::_notification(int p_what) { if (p_what == NOTIFICATION_READY) { String installed_plugin = GLOBAL_DEF("editor/version_control/plugin_name", ""); - String project_path = GLOBAL_DEF("editor/version_control/project_path", OS::get_singleton()->get_resource_dir()); - project_path_input->set_text(project_path); bool has_autoload_enable = GLOBAL_DEF("editor/version_control/autoload_on_startup", false); if (installed_plugin != "" && has_autoload_enable) { - if (_load_plugin(installed_plugin, project_path)) { + if (_load_plugin(installed_plugin)) { _set_credentials(); } } @@ -108,18 +106,15 @@ void VersionControlEditorPlugin::_initialize_vcs() { const int id = set_up_choice->get_selected_id(); String selected_plugin = set_up_choice->get_item_text(id); - if (_load_plugin(selected_plugin, project_path_input->get_text())) { + if (_load_plugin(selected_plugin)) { ProjectSettings::get_singleton()->set("editor/version_control/autoload_on_startup", true); ProjectSettings::get_singleton()->set("editor/version_control/plugin_name", selected_plugin); - ProjectSettings::get_singleton()->set("editor/version_control/project_path", project_path_input->get_text()); ProjectSettings::get_singleton()->save(); } } void VersionControlEditorPlugin::_set_vcs_ui_state(bool p_enabled) { - select_project_path_button->set_disabled(p_enabled); set_up_dialog->get_ok_button()->set_disabled(!p_enabled); - project_path_input->set_editable(!p_enabled); set_up_choice->set_disabled(p_enabled); toggle_vcs_choice->set_pressed_no_signal(p_enabled); } @@ -145,14 +140,14 @@ void VersionControlEditorPlugin::_set_credentials() { EditorSettings::get_singleton()->set_setting("version_control/ssh_private_key_path", ssh_private_key); } -bool VersionControlEditorPlugin::_load_plugin(String p_name, String p_project_path) { +bool VersionControlEditorPlugin::_load_plugin(String p_name) { Object *extension_instance = ClassDB::instantiate(p_name); ERR_FAIL_NULL_V_MSG(extension_instance, false, "Received a nullptr VCS extension instance during construction."); EditorVCSInterface *vcs_plugin = Object::cast_to<EditorVCSInterface>(extension_instance); ERR_FAIL_NULL_V_MSG(vcs_plugin, false, vformat("Could not cast VCS extension instance to %s.", EditorVCSInterface::get_class_static())); - String res_dir = project_path_input->get_text(); + String res_dir = OS::get_singleton()->get_resource_dir(); ERR_FAIL_COND_V_MSG(!vcs_plugin->initialize(res_dir), false, "Could not initialize " + p_name); @@ -911,10 +906,6 @@ void VersionControlEditorPlugin::_toggle_vcs_integration(bool p_toggled) { } } -void VersionControlEditorPlugin::_project_path_selected(String p_project_path) { - project_path_input->set_text(p_project_path); -} - void VersionControlEditorPlugin::fetch_available_vcs_plugin_names() { available_plugins.clear(); ClassDB::get_direct_inheriters_from_class(EditorVCSInterface::get_class_static(), &available_plugins); @@ -1008,34 +999,6 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() { set_up_choice->set_h_size_flags(Control::SIZE_EXPAND_FILL); set_up_hbc->add_child(set_up_choice); - HBoxContainer *project_path_hbc = memnew(HBoxContainer); - project_path_hbc->set_h_size_flags(Control::SIZE_FILL); - set_up_vbc->add_child(project_path_hbc); - - Label *project_path_label = memnew(Label); - project_path_label->set_h_size_flags(Control::SIZE_EXPAND_FILL); - project_path_label->set_text(TTR("VCS Project Path")); - project_path_hbc->add_child(project_path_label); - - project_path_input = memnew(LineEdit); - project_path_input->set_h_size_flags(Control::SIZE_EXPAND_FILL); - project_path_input->set_text(OS::get_singleton()->get_resource_dir()); - project_path_hbc->add_child(project_path_input); - - FileDialog *select_project_path_file_dialog = memnew(FileDialog); - select_project_path_file_dialog->set_access(FileDialog::ACCESS_FILESYSTEM); - select_project_path_file_dialog->set_file_mode(FileDialog::FILE_MODE_OPEN_DIR); - select_project_path_file_dialog->set_show_hidden_files(true); - select_project_path_file_dialog->set_current_dir(OS::get_singleton()->get_resource_dir()); - select_project_path_file_dialog->connect(SNAME("dir_selected"), callable_mp(this, &VersionControlEditorPlugin::_project_path_selected)); - project_path_hbc->add_child(select_project_path_file_dialog); - - select_project_path_button = memnew(Button); - select_project_path_button->set_icon(EditorNode::get_singleton()->get_gui_base()->get_theme_icon("Folder", "EditorIcons")); - select_project_path_button->connect(SNAME("pressed"), callable_mp(this, &VersionControlEditorPlugin::_popup_file_dialog).bind(select_project_path_file_dialog)); - select_project_path_button->set_tooltip_text(TTR("Select VCS project path")); - project_path_hbc->add_child(select_project_path_button); - HBoxContainer *toggle_vcs_hbc = memnew(HBoxContainer); toggle_vcs_hbc->set_h_size_flags(Control::SIZE_EXPAND_FILL); set_up_vbc->add_child(toggle_vcs_hbc); diff --git a/editor/plugins/version_control_editor_plugin.h b/editor/plugins/version_control_editor_plugin.h index 3cb18ba5b5..d73588a1bf 100644 --- a/editor/plugins/version_control_editor_plugin.h +++ b/editor/plugins/version_control_editor_plugin.h @@ -73,8 +73,6 @@ private: AcceptDialog *set_up_dialog = nullptr; CheckButton *toggle_vcs_choice = nullptr; OptionButton *set_up_choice = nullptr; - LineEdit *project_path_input = nullptr; - Button *select_project_path_button = nullptr; VBoxContainer *set_up_vbc = nullptr; VBoxContainer *set_up_settings_vbc = nullptr; LineEdit *set_up_username = nullptr; @@ -152,7 +150,7 @@ private: void _update_opened_tabs(); void _update_extra_options(); - bool _load_plugin(String p_name, String p_project_path); + bool _load_plugin(String p_name); void _pull(); void _push(); @@ -196,7 +194,6 @@ private: void _create_vcs_metadata_files(); void _popup_file_dialog(Variant p_file_dialog_variant); void _toggle_vcs_integration(bool p_toggled); - void _project_path_selected(String p_project_path); friend class EditorVCSInterface; diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp index b406b2a1ce..b99a83a546 100644 --- a/editor/project_settings_editor.cpp +++ b/editor/project_settings_editor.cpp @@ -553,6 +553,14 @@ void ProjectSettingsEditor::_update_theme() { } } +void ProjectSettingsEditor::_input_filter_focused() { + set_close_on_escape(false); +} + +void ProjectSettingsEditor::_input_filter_unfocused() { + set_close_on_escape(true); +} + void ProjectSettingsEditor::_notification(int p_what) { switch (p_what) { case NOTIFICATION_VISIBILITY_CHANGED: { @@ -683,6 +691,8 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) { action_map_editor->connect("action_removed", callable_mp(this, &ProjectSettingsEditor::_action_removed)); action_map_editor->connect("action_renamed", callable_mp(this, &ProjectSettingsEditor::_action_renamed)); action_map_editor->connect("action_reordered", callable_mp(this, &ProjectSettingsEditor::_action_reordered)); + action_map_editor->connect(SNAME("filter_focused"), callable_mp(this, &ProjectSettingsEditor::_input_filter_focused)); + action_map_editor->connect(SNAME("filter_unfocused"), callable_mp(this, &ProjectSettingsEditor::_input_filter_unfocused)); tab_container->add_child(action_map_editor); localization_editor = memnew(LocalizationEditor); diff --git a/editor/project_settings_editor.h b/editor/project_settings_editor.h index 7f6dd1b692..1687be47fb 100644 --- a/editor/project_settings_editor.h +++ b/editor/project_settings_editor.h @@ -107,6 +107,9 @@ class ProjectSettingsEditor : public AcceptDialog { void _update_action_map_editor(); void _update_theme(); + void _input_filter_focused(); + void _input_filter_unfocused(); + protected: void _notification(int p_what); static void _bind_methods(); |