summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp6
-rw-r--r--editor/plugins/canvas_item_editor_plugin.h1
-rw-r--r--editor/plugins/node_3d_editor_plugin.cpp7
-rw-r--r--editor/plugins/node_3d_editor_plugin.h1
-rw-r--r--editor/plugins/tiles/tile_data_editors.cpp2
-rw-r--r--editor/project_converter_3_to_4.cpp30
-rw-r--r--editor/renames_map_3_to_4.cpp12
7 files changed, 33 insertions, 26 deletions
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index 0f9ce89f02..75a444c877 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -896,15 +896,16 @@ void CanvasItemEditor::_snap_changed() {
}
void CanvasItemEditor::_selection_result_pressed(int p_result) {
- if (selection_results.size() <= p_result) {
+ if (selection_results_menu.size() <= p_result) {
return;
}
- CanvasItem *item = selection_results[p_result].item;
+ CanvasItem *item = selection_results_menu[p_result].item;
if (item) {
_select_click_on_item(item, Point2(), selection_menu_additive_selection);
}
+ selection_results_menu.clear();
}
void CanvasItemEditor::_selection_menu_hide() {
@@ -2247,6 +2248,7 @@ bool CanvasItemEditor::_gui_input_select(const Ref<InputEvent> &p_event) {
selection_menu->set_item_tooltip(i, String(item->get_name()) + "\nType: " + item->get_class() + "\nPath: " + node_path);
}
+ selection_results_menu = selection_results;
selection_menu_additive_selection = b->is_shift_pressed();
selection_menu->set_position(viewport->get_screen_transform().xform(b->get_position()));
selection_menu->reset_size();
diff --git a/editor/plugins/canvas_item_editor_plugin.h b/editor/plugins/canvas_item_editor_plugin.h
index ebe87a56f7..c5b9bf9e0b 100644
--- a/editor/plugins/canvas_item_editor_plugin.h
+++ b/editor/plugins/canvas_item_editor_plugin.h
@@ -256,6 +256,7 @@ private:
}
};
Vector<_SelectResult> selection_results;
+ Vector<_SelectResult> selection_results_menu;
struct _HoverResult {
Point2 position;
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index 96f5aeedf0..6580340af4 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -1543,6 +1543,7 @@ void Node3DEditorViewport::_list_select(Ref<InputEventMouseButton> b) {
selection_menu->set_item_tooltip(i, String(spat->get_name()) + "\nType: " + spat->get_class() + "\nPath: " + node_path);
}
+ selection_results_menu = selection_results;
selection_menu->set_position(get_screen_position() + b->get_position());
selection_menu->reset_size();
selection_menu->popup();
@@ -3609,15 +3610,17 @@ void Node3DEditorViewport::_toggle_cinema_preview(bool p_activate) {
}
void Node3DEditorViewport::_selection_result_pressed(int p_result) {
- if (selection_results.size() <= p_result) {
+ if (selection_results_menu.size() <= p_result) {
return;
}
- clicked = selection_results[p_result].item->get_instance_id();
+ clicked = selection_results_menu[p_result].item->get_instance_id();
if (clicked.is_valid()) {
_select_clicked(spatial_editor->get_tool_mode() == Node3DEditor::TOOL_MODE_SELECT);
}
+
+ selection_results_menu.clear();
}
void Node3DEditorViewport::_selection_menu_hide() {
diff --git a/editor/plugins/node_3d_editor_plugin.h b/editor/plugins/node_3d_editor_plugin.h
index a1fd9757d0..e5267e5fad 100644
--- a/editor/plugins/node_3d_editor_plugin.h
+++ b/editor/plugins/node_3d_editor_plugin.h
@@ -290,6 +290,7 @@ private:
ObjectID clicked;
ObjectID material_target;
Vector<_RayResult> selection_results;
+ Vector<_RayResult> selection_results_menu;
bool clicked_wants_append = false;
bool selection_in_progress = false;
diff --git a/editor/plugins/tiles/tile_data_editors.cpp b/editor/plugins/tiles/tile_data_editors.cpp
index 3dd0c84ee7..73d2da63b7 100644
--- a/editor/plugins/tiles/tile_data_editors.cpp
+++ b/editor/plugins/tiles/tile_data_editors.cpp
@@ -784,7 +784,7 @@ void GenericTilePolygonEditor::_bind_methods() {
ClassDB::bind_method(D_METHOD("remove_polygon", "index"), &GenericTilePolygonEditor::remove_polygon);
ClassDB::bind_method(D_METHOD("clear_polygons"), &GenericTilePolygonEditor::clear_polygons);
ClassDB::bind_method(D_METHOD("set_polygon", "index", "polygon"), &GenericTilePolygonEditor::set_polygon);
- ClassDB::bind_method(D_METHOD("get_polygon", "index"), &GenericTilePolygonEditor::set_polygon);
+ ClassDB::bind_method(D_METHOD("get_polygon", "index"), &GenericTilePolygonEditor::get_polygon);
ADD_SIGNAL(MethodInfo("polygons_changed"));
}
diff --git a/editor/project_converter_3_to_4.cpp b/editor/project_converter_3_to_4.cpp
index 0e7476d045..b7c01c061f 100644
--- a/editor/project_converter_3_to_4.cpp
+++ b/editor/project_converter_3_to_4.cpp
@@ -78,11 +78,11 @@ public:
RegEx reg_image_unlock = RegEx("([a-zA-Z0-9_\\.]+)\\.unlock\\(\\)");
RegEx reg_instantiate = RegEx("\\.instance\\(([^\\)]*)\\)");
// Simple OS properties with getters/setters.
- RegEx reg_os_current_screen = RegEx("\\bOS\\.(set_|get_)?current_screen\\b");
- RegEx reg_os_min_window_size = RegEx("\\bOS\\.(set_|get_)?min_window_size\\b");
- RegEx reg_os_max_window_size = RegEx("\\bOS\\.(set_|get_)?max_window_size\\b");
- RegEx reg_os_window_position = RegEx("\\bOS\\.(set_|get_)?window_position\\b");
- RegEx reg_os_window_size = RegEx("\\bOS\\.(set_|get_)?window_size\\b");
+ RegEx reg_os_current_screen = RegEx("\\bOS\\.((set_|get_)?)current_screen\\b");
+ RegEx reg_os_min_window_size = RegEx("\\bOS\\.((set_|get_)?)min_window_size\\b");
+ RegEx reg_os_max_window_size = RegEx("\\bOS\\.((set_|get_)?)max_window_size\\b");
+ RegEx reg_os_window_position = RegEx("\\bOS\\.((set_|get_)?)window_position\\b");
+ RegEx reg_os_window_size = RegEx("\\bOS\\.((set_|get_)?)window_size\\b");
RegEx reg_os_getset_screen_orient = RegEx("\\bOS\\.(s|g)et_screen_orientation\\b");
// OS property getters/setters for non trivial replacements.
RegEx reg_os_set_window_resizable = RegEx(make_regex_gds_os_property_set("set_window_resizable"));
@@ -1055,20 +1055,20 @@ bool ProjectConverter3To4::test_array_names() {
// List of excluded functions from builtin types and global namespace, because currently it is not possible to get list of functions from them.
// This will be available when https://github.com/godotengine/godot/pull/49053 or similar will be included into Godot.
- static const char *builtin_types_excluded_functions[] = { "dict_to_inst", "inst_to_dict", "bytes_to_var", "bytes_to_var_with_objects", "db_to_linear", "deg_to_rad", "linear_to_db", "rad_to_deg", "randf_range", "snapped", "str_to_var", "var_to_str", "var_to_bytes", "var_to_bytes_with_objects", "move_toward", "uri_encode", "uri_decode", "remove_at", "get_rotation_quaternion", "clamp", "grow_side", "is_absolute_path", "is_valid_int", "lerp", "to_ascii_buffer", "to_utf8_buffer", "to_utf32_buffer", "snapped", "remap", "rfind", nullptr };
+ static const char *builtin_types_excluded_functions[] = { "dict_to_inst", "inst_to_dict", "bytes_to_var", "bytes_to_var_with_objects", "db_to_linear", "deg_to_rad", "linear_to_db", "rad_to_deg", "randf_range", "snapped", "str_to_var", "var_to_str", "var_to_bytes", "var_to_bytes_with_objects", "move_toward", "uri_encode", "uri_decode", "remove_at", "get_rotation_quaternion", "limit_length", "grow_side", "is_absolute_path", "is_valid_int", "lerp", "to_ascii_buffer", "to_utf8_buffer", "to_utf32_buffer", "snapped", "remap", "rfind", nullptr };
for (int current_index = 0; builtin_types_excluded_functions[current_index]; current_index++) {
all_functions.insert(builtin_types_excluded_functions[current_index]);
}
- // for (int type = Variant::Type::NIL + 1; type < Variant::Type::VARIANT_MAX; type++) {
- // List<MethodInfo> method_list;
- // Variant::get_method_list_by_type(&method_list, Variant::Type(type));
- // for (MethodInfo &function_data : method_list) {
- // if (!all_functions.has(function_data.name)) {
- // all_functions.insert(function_data.name);
- // }
- // }
- // }
+ //for (int type = Variant::Type::NIL + 1; type < Variant::Type::VARIANT_MAX; type++) {
+ // List<MethodInfo> method_list;
+ // Variant::get_method_list_by_type(&method_list, Variant::Type(type));
+ // for (MethodInfo &function_data : method_list) {
+ // if (!all_functions.has(function_data.name)) {
+ // all_functions.insert(function_data.name);
+ // }
+ // }
+ //}
List<StringName> classes_list;
ClassDB::get_class_list(&classes_list);
diff --git a/editor/renames_map_3_to_4.cpp b/editor/renames_map_3_to_4.cpp
index d7cac9a2b9..1c212642ce 100644
--- a/editor/renames_map_3_to_4.cpp
+++ b/editor/renames_map_3_to_4.cpp
@@ -577,9 +577,9 @@ const char *RenamesMap3To4::gdscript_function_renames[][2] = {
// Builtin types
// Remember to add them to the builtin_types_excluded_functions variable, because for now these functions cannot be listed.
- // { "empty", "is_empty" }, // Array -- Used as custom rule. Be careful, this will be used everywhere.
- // { "remove", "remove_at" }, // Array -- Breaks Directory and several more.
- { "clamped", "clamp" }, // Vector2 -- Be careful, this will be used everywhere.
+ //{ "empty", "is_empty" }, // Array -- Used as custom rule. Be careful, this will be used everywhere.
+ //{ "remove", "remove_at" }, // Array -- Breaks Directory and several more.
+ { "clamped", "limit_length" }, // Vector2
{ "get_rotation_quat", "get_rotation_quaternion" }, // Basis
{ "grow_margin", "grow_side" }, // Rect2
{ "invert", "reverse" }, // Array -- Give it a check. Be careful, this will be used everywhere.
@@ -1024,9 +1024,9 @@ const char *RenamesMap3To4::csharp_function_renames[][2] = {
{ "GetUniformName", "GetParameterName" }, // ParameterRef
// Builtin types
- // { "Empty", "IsEmpty" }, // Array -- Used as custom rule. Be careful, this will be used everywhere.
- // { "Remove", "RemoveAt" }, // Array -- Breaks Directory and several more.
- { "Clamped", "Clamp" }, // Vector2 -- Be careful, this will be used everywhere.
+ // { "Empty", "IsEmpty" }, // Array -- Used as custom rule. Be careful, this will be used everywhere.
+ // { "Remove", "RemoveAt" }, // Array -- Breaks Directory and several more.
+ { "Clamped", "LimitLength" }, // Vector2
{ "GetRotationQuat", "GetRotationQuaternion" }, // Basis
{ "GrowMargin", "GrowSide" }, // Rect2
{ "Invert", "Reverse" }, // Array -- Give it a check. Be careful, this will be used everywhere.