summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/animation_track_editor_plugins.cpp4
-rw-r--r--editor/connections_dialog.cpp24
-rw-r--r--editor/connections_dialog.h2
-rw-r--r--editor/editor_node.cpp22
-rw-r--r--editor/editor_node.h2
-rw-r--r--editor/editor_properties.cpp2
-rw-r--r--editor/editor_properties_array_dict.cpp2
7 files changed, 41 insertions, 17 deletions
diff --git a/editor/animation_track_editor_plugins.cpp b/editor/animation_track_editor_plugins.cpp
index ba73a63245..2895aa9710 100644
--- a/editor/animation_track_editor_plugins.cpp
+++ b/editor/animation_track_editor_plugins.cpp
@@ -389,7 +389,7 @@ Rect2 AnimationTrackEditSpriteFrame::get_key_rect(int p_index, float p_pixels_se
size = texture->get_size();
- if (bool(object->call("is_region"))) {
+ if (bool(object->call("is_region_enabled"))) {
size = Rect2(object->call("get_region_rect")).size;
}
@@ -479,7 +479,7 @@ void AnimationTrackEditSpriteFrame::draw_key(int p_index, float p_pixels_sec, in
region.size = texture->get_size();
- if (bool(object->call("is_region"))) {
+ if (bool(object->call("is_region_enabled"))) {
region = Rect2(object->call("get_region_rect"));
}
diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp
index f4d293e9f4..20a9e633a8 100644
--- a/editor/connections_dialog.cpp
+++ b/editor/connections_dialog.cpp
@@ -170,6 +170,10 @@ void ConnectDialog::_tree_node_selected() {
_update_ok_enabled();
}
+void ConnectDialog::_focus_currently_connected() {
+ tree->set_selected(source);
+}
+
void ConnectDialog::_unbind_count_changed(double p_count) {
for (Control *control : bind_controls) {
BaseButton *b = Object::cast_to<BaseButton>(control);
@@ -577,6 +581,8 @@ void ConnectDialog::init(const ConnectionData &p_cd, const PackedStringArray &p_
void ConnectDialog::popup_dialog(const String p_for_signal) {
from_signal->set_text(p_for_signal);
error_label->add_theme_color_override("font_color", error_label->get_theme_color(SNAME("error_color"), SNAME("Editor")));
+ filter_nodes->clear();
+
if (!advanced->is_pressed()) {
error_label->set_visible(!_find_first_script(get_tree()->get_edited_scene_root(), get_tree()->get_edited_scene_root()));
}
@@ -628,12 +634,28 @@ ConnectDialog::ConnectDialog() {
tree = memnew(SceneTreeEditor(false));
tree->set_connecting_signal(true);
tree->set_show_enabled_subscene(true);
+ tree->set_v_size_flags(Control::SIZE_FILL | Control::SIZE_EXPAND);
tree->get_scene_tree()->connect("item_activated", callable_mp(this, &ConnectDialog::_item_activated));
tree->connect("node_selected", callable_mp(this, &ConnectDialog::_tree_node_selected));
tree->set_connect_to_script_mode(true);
- Node *mc = vbc_left->add_margin_child(TTR("Connect to Script:"), tree, true);
+ HBoxContainer *hbc_filter = memnew(HBoxContainer);
+
+ filter_nodes = memnew(LineEdit);
+ hbc_filter->add_child(filter_nodes);
+ filter_nodes->set_h_size_flags(Control::SIZE_FILL | Control::SIZE_EXPAND);
+ filter_nodes->set_placeholder(TTR("Filter Nodes"));
+ filter_nodes->set_clear_button_enabled(true);
+ filter_nodes->connect("text_changed", callable_mp(tree, &SceneTreeEditor::set_filter));
+
+ Button *focus_current = memnew(Button);
+ hbc_filter->add_child(focus_current);
+ focus_current->set_text(TTR("Go to Source"));
+ focus_current->connect("pressed", callable_mp(this, &ConnectDialog::_focus_currently_connected));
+
+ Node *mc = vbc_left->add_margin_child(TTR("Connect to Script:"), hbc_filter, false);
connect_to_label = Object::cast_to<Label>(vbc_left->get_child(mc->get_index() - 1));
+ vbc_left->add_child(tree);
error_label = memnew(Label);
error_label->set_text(TTR("Scene does not contain any script."));
diff --git a/editor/connections_dialog.h b/editor/connections_dialog.h
index 277ea03cf7..e5375a3fc8 100644
--- a/editor/connections_dialog.h
+++ b/editor/connections_dialog.h
@@ -106,6 +106,7 @@ public:
private:
Label *connect_to_label = nullptr;
LineEdit *from_signal = nullptr;
+ LineEdit *filter_nodes = nullptr;
Node *source = nullptr;
ConnectionData source_connection_data;
StringName signal;
@@ -142,6 +143,7 @@ private:
void _item_activated();
void _text_submitted(const String &p_text);
void _tree_node_selected();
+ void _focus_currently_connected();
void _method_selected();
void _create_method_tree_items(const List<MethodInfo> &p_methods, TreeItem *p_parent_item);
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index f6fe6c9f76..3adebb2f8e 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -2953,7 +2953,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
} else if (export_template_manager->can_install_android_template()) {
install_android_build_template->popup_centered();
} else {
- custom_build_manage_templates->popup_centered();
+ gradle_build_manage_templates->popup_centered();
}
}
} break;
@@ -3043,7 +3043,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
#endif
} break;
case SETTINGS_INSTALL_ANDROID_BUILD_TEMPLATE: {
- custom_build_manage_templates->hide();
+ gradle_build_manage_templates->hide();
file_android_build_source->popup_centered_ratio();
} break;
case SETTINGS_MANAGE_FEATURE_PROFILES: {
@@ -5624,8 +5624,9 @@ void EditorNode::_bottom_panel_switch(bool p_enable, int p_idx) {
return;
}
- bottom_panel_updating = true;
if (p_enable) {
+ bottom_panel_updating = true;
+
for (int i = 0; i < bottom_panel_items.size(); i++) {
bottom_panel_items[i].button->set_pressed(i == p_idx);
bottom_panel_items[i].control->set_visible(i == p_idx);
@@ -5642,7 +5643,6 @@ void EditorNode::_bottom_panel_switch(bool p_enable, int p_idx) {
top_split->hide();
}
bottom_panel_raise->show();
-
} else {
bottom_panel->add_theme_style_override("panel", gui_base->get_theme_stylebox(SNAME("BottomPanel"), SNAME("EditorStyles")));
bottom_panel_items[p_idx].button->set_pressed(false);
@@ -7706,12 +7706,12 @@ EditorNode::EditorNode() {
save_confirmation->connect("confirmed", callable_mp(this, &EditorNode::_menu_confirm_current));
save_confirmation->connect("custom_action", callable_mp(this, &EditorNode::_discard_changes));
- custom_build_manage_templates = memnew(ConfirmationDialog);
- custom_build_manage_templates->set_text(TTR("Android build template is missing, please install relevant templates."));
- custom_build_manage_templates->set_ok_button_text(TTR("Manage Templates"));
- custom_build_manage_templates->add_button(TTR("Install from file"))->connect("pressed", callable_mp(this, &EditorNode::_menu_option).bind(SETTINGS_INSTALL_ANDROID_BUILD_TEMPLATE));
- custom_build_manage_templates->connect("confirmed", callable_mp(this, &EditorNode::_menu_option).bind(SETTINGS_MANAGE_EXPORT_TEMPLATES));
- gui_base->add_child(custom_build_manage_templates);
+ gradle_build_manage_templates = memnew(ConfirmationDialog);
+ gradle_build_manage_templates->set_text(TTR("Android build template is missing, please install relevant templates."));
+ gradle_build_manage_templates->set_ok_button_text(TTR("Manage Templates"));
+ gradle_build_manage_templates->add_button(TTR("Install from file"))->connect("pressed", callable_mp(this, &EditorNode::_menu_option).bind(SETTINGS_INSTALL_ANDROID_BUILD_TEMPLATE));
+ gradle_build_manage_templates->connect("confirmed", callable_mp(this, &EditorNode::_menu_option).bind(SETTINGS_MANAGE_EXPORT_TEMPLATES));
+ gui_base->add_child(gradle_build_manage_templates);
file_android_build_source = memnew(EditorFileDialog);
file_android_build_source->set_title(TTR("Select Android sources file"));
@@ -7722,7 +7722,7 @@ EditorNode::EditorNode() {
gui_base->add_child(file_android_build_source);
install_android_build_template = memnew(ConfirmationDialog);
- install_android_build_template->set_text(TTR("This will set up your project for custom Android builds by installing the source template to \"res://android/build\".\nYou can then apply modifications and build your own custom APK on export (adding modules, changing the AndroidManifest.xml, etc.).\nNote that in order to make custom builds instead of using pre-built APKs, the \"Use Custom Build\" option should be enabled in the Android export preset."));
+ install_android_build_template->set_text(TTR("This will set up your project for gradle Android builds by installing the source template to \"res://android/build\".\nYou can then apply modifications and build your own custom APK on export (adding modules, changing the AndroidManifest.xml, etc.).\nNote that in order to make gradle builds instead of using pre-built APKs, the \"Use Gradle Build\" option should be enabled in the Android export preset."));
install_android_build_template->set_ok_button_text(TTR("Install"));
install_android_build_template->connect("confirmed", callable_mp(this, &EditorNode::_menu_confirm_current));
gui_base->add_child(install_android_build_template);
diff --git a/editor/editor_node.h b/editor/editor_node.h
index 19a0e49a12..eefe45ca1f 100644
--- a/editor/editor_node.h
+++ b/editor/editor_node.h
@@ -398,7 +398,7 @@ private:
PopupMenu *editor_layouts = nullptr;
EditorLayoutsDialog *layout_dialog = nullptr;
- ConfirmationDialog *custom_build_manage_templates = nullptr;
+ ConfirmationDialog *gradle_build_manage_templates = nullptr;
ConfirmationDialog *install_android_build_template = nullptr;
ConfirmationDialog *remove_android_build_template = nullptr;
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp
index c9eae77b53..33bba90c70 100644
--- a/editor/editor_properties.cpp
+++ b/editor/editor_properties.cpp
@@ -4593,7 +4593,7 @@ EditorProperty *EditorInspectorDefaultPlugin::get_editor_for_property(Object *p_
} break;
case Variant::PACKED_STRING_ARRAY: {
EditorPropertyArray *editor = memnew(EditorPropertyArray);
- editor->setup(Variant::PACKED_STRING_ARRAY);
+ editor->setup(Variant::PACKED_STRING_ARRAY, p_hint_text);
return editor;
} break;
case Variant::PACKED_VECTOR2_ARRAY: {
diff --git a/editor/editor_properties_array_dict.cpp b/editor/editor_properties_array_dict.cpp
index b96ac9dbcb..24cfa7ad7b 100644
--- a/editor/editor_properties_array_dict.cpp
+++ b/editor/editor_properties_array_dict.cpp
@@ -574,7 +574,7 @@ void EditorPropertyArray::setup(Variant::Type p_array_type, const String &p_hint
// The format of p_hint_string is:
// subType/subTypeHint:nextSubtype ... etc.
- if (array_type == Variant::ARRAY && !p_hint_string.is_empty()) {
+ if (!p_hint_string.is_empty()) {
int hint_subtype_separator = p_hint_string.find(":");
if (hint_subtype_separator >= 0) {
String subtype_string = p_hint_string.substr(0, hint_subtype_separator);