diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/plugins/collision_shape_2d_editor_plugin.cpp | 1 | ||||
-rw-r--r-- | editor/project_manager.cpp | 6 | ||||
-rw-r--r-- | editor/scene_tree_dock.cpp | 5 | ||||
-rw-r--r-- | editor/script_create_dialog.cpp | 7 |
4 files changed, 16 insertions, 3 deletions
diff --git a/editor/plugins/collision_shape_2d_editor_plugin.cpp b/editor/plugins/collision_shape_2d_editor_plugin.cpp index 0f381c06b4..596629f8e8 100644 --- a/editor/plugins/collision_shape_2d_editor_plugin.cpp +++ b/editor/plugins/collision_shape_2d_editor_plugin.cpp @@ -36,6 +36,7 @@ #include "scene/resources/concave_polygon_shape_2d.h" #include "scene/resources/convex_polygon_shape_2d.h" #include "scene/resources/line_shape_2d.h" +#include "scene/resources/ray_shape_2d.h" #include "scene/resources/rectangle_shape_2d.h" #include "scene/resources/segment_shape_2d.h" diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index dc5ff6a5eb..499f7d4017 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -916,6 +916,8 @@ public: icon = nullptr; icon_needs_reload = true; hover = false; + + set_focus_mode(FocusMode::FOCUS_ALL); } void set_is_favorite(bool fav) { @@ -1739,6 +1741,10 @@ void ProjectList::_panel_input(const Ref<InputEvent> &p_ev, Node *p_hb) { select_project(clicked_index); } + if (_selected_project_keys.has(clicked_project.project_key)) { + clicked_project.control->grab_focus(); + } + emit_signal(SIGNAL_SELECTION_CHANGED); if (!mb->get_control() && mb->is_doubleclick()) { diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp index a81a2ff4e9..c37d32b26b 100644 --- a/editor/scene_tree_dock.cpp +++ b/editor/scene_tree_dock.cpp @@ -2557,6 +2557,11 @@ void SceneTreeDock::_focus_node() { } void SceneTreeDock::attach_script_to_selected(bool p_extend) { + if (ScriptServer::get_language_count() == 0) { + EditorNode::get_singleton()->show_warning(TTR("Cannot attach a script: there are no languages registered.\nThis is probably because this editor was built with all language modules disabled.")); + return; + } + if (!profile_allow_script_editing) { return; } diff --git a/editor/script_create_dialog.cpp b/editor/script_create_dialog.cpp index 04fbfdff9d..ae5229b628 100644 --- a/editor/script_create_dialog.cpp +++ b/editor/script_create_dialog.cpp @@ -783,7 +783,7 @@ ScriptCreateDialog::ScriptCreateDialog() { gc->add_child(memnew(Label(TTR("Language:")))); gc->add_child(language_menu); - default_language = 0; + default_language = -1; for (int i = 0; i < ScriptServer::get_language_count(); i++) { String lang = ScriptServer::get_language(i)->get_name(); language_menu->add_item(lang); @@ -791,8 +791,9 @@ ScriptCreateDialog::ScriptCreateDialog() { default_language = i; } } - - language_menu->select(default_language); + if (default_language >= 0) { + language_menu->select(default_language); + } current_language = default_language; language_menu->connect("item_selected", callable_mp(this, &ScriptCreateDialog::_lang_changed)); |