summaryrefslogtreecommitdiff
path: root/scene/2d
diff options
context:
space:
mode:
Diffstat (limited to 'scene/2d')
-rw-r--r--scene/2d/animated_sprite.cpp6
-rw-r--r--scene/2d/area_2d.cpp26
-rw-r--r--scene/2d/audio_stream_player_2d.cpp4
-rw-r--r--scene/2d/canvas_item.cpp6
-rw-r--r--scene/2d/canvas_item.h4
-rw-r--r--scene/2d/collision_shape_2d.cpp4
-rw-r--r--scene/2d/cpu_particles_2d.cpp10
-rw-r--r--scene/2d/light_occluder_2d.cpp4
-rw-r--r--scene/2d/line_2d.cpp8
-rw-r--r--scene/2d/navigation_polygon.cpp4
-rw-r--r--scene/2d/path_2d.cpp4
-rw-r--r--scene/2d/physics_body_2d.cpp24
-rw-r--r--scene/2d/polygon_2d.cpp4
-rw-r--r--scene/2d/sprite.cpp4
-rw-r--r--scene/2d/tile_map.cpp6
-rw-r--r--scene/2d/touch_screen_button.cpp6
-rw-r--r--scene/2d/visibility_notifier_2d.cpp4
17 files changed, 64 insertions, 64 deletions
diff --git a/scene/2d/animated_sprite.cpp b/scene/2d/animated_sprite.cpp
index b98820d5ac..ef99be5b94 100644
--- a/scene/2d/animated_sprite.cpp
+++ b/scene/2d/animated_sprite.cpp
@@ -475,10 +475,10 @@ void AnimatedSprite::_notification(int p_what) {
void AnimatedSprite::set_sprite_frames(const Ref<SpriteFrames> &p_frames) {
if (frames.is_valid())
- frames->disconnect("changed", this, "_res_changed");
+ frames->disconnect_compat("changed", this, "_res_changed");
frames = p_frames;
if (frames.is_valid())
- frames->connect("changed", this, "_res_changed");
+ frames->connect_compat("changed", this, "_res_changed");
if (!frames.is_valid()) {
frame = 0;
@@ -742,7 +742,7 @@ void AnimatedSprite::_bind_methods() {
ADD_GROUP("Animation", "");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "frames", PROPERTY_HINT_RESOURCE_TYPE, "SpriteFrames"), "set_sprite_frames", "get_sprite_frames");
- ADD_PROPERTY(PropertyInfo(Variant::STRING, "animation"), "set_animation", "get_animation");
+ ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "animation"), "set_animation", "get_animation");
ADD_PROPERTY(PropertyInfo(Variant::INT, "frame"), "set_frame", "get_frame");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "speed_scale"), "set_speed_scale", "get_speed_scale");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "playing"), "_set_playing", "_is_playing");
diff --git a/scene/2d/area_2d.cpp b/scene/2d/area_2d.cpp
index b661db2e52..f5f1a2ed3c 100644
--- a/scene/2d/area_2d.cpp
+++ b/scene/2d/area_2d.cpp
@@ -171,8 +171,8 @@ void Area2D::_body_inout(int p_status, const RID &p_body, ObjectID p_instance, i
E->get().rc = 0;
E->get().in_tree = node && node->is_inside_tree();
if (node) {
- node->connect(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree, make_binds(objid));
- node->connect(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree, make_binds(objid));
+ node->connect_compat(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree, make_binds(objid));
+ node->connect_compat(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree, make_binds(objid));
if (E->get().in_tree) {
emit_signal(SceneStringNames::get_singleton()->body_entered, node);
}
@@ -198,8 +198,8 @@ void Area2D::_body_inout(int p_status, const RID &p_body, ObjectID p_instance, i
if (E->get().rc == 0) {
if (node) {
- node->disconnect(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree);
- node->disconnect(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree);
+ node->disconnect_compat(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree);
+ node->disconnect_compat(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree);
if (E->get().in_tree)
emit_signal(SceneStringNames::get_singleton()->body_exited, obj);
}
@@ -273,8 +273,8 @@ void Area2D::_area_inout(int p_status, const RID &p_area, ObjectID p_instance, i
E->get().rc = 0;
E->get().in_tree = node && node->is_inside_tree();
if (node) {
- node->connect(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_area_enter_tree, make_binds(objid));
- node->connect(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_area_exit_tree, make_binds(objid));
+ node->connect_compat(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_area_enter_tree, make_binds(objid));
+ node->connect_compat(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_area_exit_tree, make_binds(objid));
if (E->get().in_tree) {
emit_signal(SceneStringNames::get_singleton()->area_entered, node);
}
@@ -300,8 +300,8 @@ void Area2D::_area_inout(int p_status, const RID &p_area, ObjectID p_instance, i
if (E->get().rc == 0) {
if (node) {
- node->disconnect(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_area_enter_tree);
- node->disconnect(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_area_exit_tree);
+ node->disconnect_compat(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_area_enter_tree);
+ node->disconnect_compat(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_area_exit_tree);
if (E->get().in_tree)
emit_signal(SceneStringNames::get_singleton()->area_exited, obj);
}
@@ -337,8 +337,8 @@ void Area2D::_clear_monitoring() {
continue;
//ERR_CONTINUE(!node);
- node->disconnect(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree);
- node->disconnect(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree);
+ node->disconnect_compat(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree);
+ node->disconnect_compat(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree);
if (!E->get().in_tree)
continue;
@@ -367,8 +367,8 @@ void Area2D::_clear_monitoring() {
continue;
//ERR_CONTINUE(!node);
- node->disconnect(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_area_enter_tree);
- node->disconnect(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_area_exit_tree);
+ node->disconnect_compat(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_area_enter_tree);
+ node->disconnect_compat(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_area_exit_tree);
if (!E->get().in_tree)
continue;
@@ -674,7 +674,7 @@ void Area2D::_bind_methods() {
ADD_GROUP("Audio Bus", "audio_bus_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "audio_bus_override"), "set_audio_bus_override", "is_overriding_audio_bus");
- ADD_PROPERTY(PropertyInfo(Variant::STRING, "audio_bus_name", PROPERTY_HINT_ENUM, ""), "set_audio_bus_name", "get_audio_bus_name");
+ ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "audio_bus_name", PROPERTY_HINT_ENUM, ""), "set_audio_bus_name", "get_audio_bus_name");
BIND_ENUM_CONSTANT(SPACE_OVERRIDE_DISABLED);
BIND_ENUM_CONSTANT(SPACE_OVERRIDE_COMBINE);
diff --git a/scene/2d/audio_stream_player_2d.cpp b/scene/2d/audio_stream_player_2d.cpp
index fd654cbf60..8419600bef 100644
--- a/scene/2d/audio_stream_player_2d.cpp
+++ b/scene/2d/audio_stream_player_2d.cpp
@@ -522,7 +522,7 @@ void AudioStreamPlayer2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "stream_paused", PROPERTY_HINT_NONE, ""), "set_stream_paused", "get_stream_paused");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "max_distance", PROPERTY_HINT_EXP_RANGE, "1,4096,1,or_greater"), "set_max_distance", "get_max_distance");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "attenuation", PROPERTY_HINT_EXP_EASING, "attenuation"), "set_attenuation", "get_attenuation");
- ADD_PROPERTY(PropertyInfo(Variant::STRING, "bus", PROPERTY_HINT_ENUM, ""), "set_bus", "get_bus");
+ ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "bus", PROPERTY_HINT_ENUM, ""), "set_bus", "get_bus");
ADD_PROPERTY(PropertyInfo(Variant::INT, "area_mask", PROPERTY_HINT_LAYERS_2D_PHYSICS), "set_area_mask", "get_area_mask");
ADD_SIGNAL(MethodInfo("finished"));
@@ -545,7 +545,7 @@ AudioStreamPlayer2D::AudioStreamPlayer2D() {
stream_paused = false;
stream_paused_fade_in = false;
stream_paused_fade_out = false;
- AudioServer::get_singleton()->connect("bus_layout_changed", this, "_bus_layout_changed");
+ AudioServer::get_singleton()->connect_compat("bus_layout_changed", this, "_bus_layout_changed");
}
AudioStreamPlayer2D::~AudioStreamPlayer2D() {
diff --git a/scene/2d/canvas_item.cpp b/scene/2d/canvas_item.cpp
index 72cafb911b..942b63898d 100644
--- a/scene/2d/canvas_item.cpp
+++ b/scene/2d/canvas_item.cpp
@@ -1263,9 +1263,9 @@ void CanvasItem::_bind_methods() {
BIND_ENUM_CONSTANT(TEXTURE_FILTER_PARENT_NODE);
BIND_ENUM_CONSTANT(TEXTURE_FILTER_NEAREST);
BIND_ENUM_CONSTANT(TEXTURE_FILTER_LINEAR);
- BIND_ENUM_CONSTANT(TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS);
+ BIND_ENUM_CONSTANT(TEXTURE_FILTER_NEAREST_WITH_MIPMAPS);
BIND_ENUM_CONSTANT(TEXTURE_FILTER_LINEAR_WITH_MIPMAPS);
- BIND_ENUM_CONSTANT(TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS_ANISOTROPIC);
+ BIND_ENUM_CONSTANT(TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC);
BIND_ENUM_CONSTANT(TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC);
BIND_ENUM_CONSTANT(TEXTURE_FILTER_MAX);
@@ -1353,7 +1353,7 @@ void CanvasItem::_update_texture_filter_changed(bool p_propagate) {
case Viewport::DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST: texture_filter_cache = VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST; break;
case Viewport::DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_LINEAR: texture_filter_cache = VS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR; break;
case Viewport::DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS: texture_filter_cache = VS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS; break;
- case Viewport::DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS: texture_filter_cache = VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS; break;
+ case Viewport::DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS: texture_filter_cache = VS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS; break;
default: {
}
}
diff --git a/scene/2d/canvas_item.h b/scene/2d/canvas_item.h
index 822e679a86..3cd8e6ef74 100644
--- a/scene/2d/canvas_item.h
+++ b/scene/2d/canvas_item.h
@@ -170,9 +170,9 @@ public:
TEXTURE_FILTER_PARENT_NODE,
TEXTURE_FILTER_NEAREST,
TEXTURE_FILTER_LINEAR,
- TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS,
+ TEXTURE_FILTER_NEAREST_WITH_MIPMAPS,
TEXTURE_FILTER_LINEAR_WITH_MIPMAPS,
- TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS_ANISOTROPIC,
+ TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC,
TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC,
TEXTURE_FILTER_MAX
};
diff --git a/scene/2d/collision_shape_2d.cpp b/scene/2d/collision_shape_2d.cpp
index bb975350a6..685d501a00 100644
--- a/scene/2d/collision_shape_2d.cpp
+++ b/scene/2d/collision_shape_2d.cpp
@@ -149,7 +149,7 @@ void CollisionShape2D::_notification(int p_what) {
void CollisionShape2D::set_shape(const Ref<Shape2D> &p_shape) {
if (shape.is_valid())
- shape->disconnect("changed", this, "_shape_changed");
+ shape->disconnect_compat("changed", this, "_shape_changed");
shape = p_shape;
update();
if (parent) {
@@ -160,7 +160,7 @@ void CollisionShape2D::set_shape(const Ref<Shape2D> &p_shape) {
}
if (shape.is_valid())
- shape->connect("changed", this, "_shape_changed");
+ shape->connect_compat("changed", this, "_shape_changed");
update_configuration_warning();
}
diff --git a/scene/2d/cpu_particles_2d.cpp b/scene/2d/cpu_particles_2d.cpp
index 922ee0c208..4e98873385 100644
--- a/scene/2d/cpu_particles_2d.cpp
+++ b/scene/2d/cpu_particles_2d.cpp
@@ -212,12 +212,12 @@ void CPUParticles2D::set_texture(const Ref<Texture2D> &p_texture) {
return;
if (texture.is_valid())
- texture->disconnect(CoreStringNames::get_singleton()->changed, this, "_texture_changed");
+ texture->disconnect_compat(CoreStringNames::get_singleton()->changed, this, "_texture_changed");
texture = p_texture;
if (texture.is_valid())
- texture->connect(CoreStringNames::get_singleton()->changed, this, "_texture_changed");
+ texture->connect_compat(CoreStringNames::get_singleton()->changed, this, "_texture_changed");
update();
_update_mesh_texture();
@@ -1053,13 +1053,13 @@ void CPUParticles2D::_set_redraw(bool p_redraw) {
update_mutex->lock();
#endif
if (redraw) {
- VS::get_singleton()->connect("frame_pre_draw", this, "_update_render_thread");
+ VS::get_singleton()->connect_compat("frame_pre_draw", this, "_update_render_thread");
VS::get_singleton()->canvas_item_set_update_when_visible(get_canvas_item(), true);
VS::get_singleton()->multimesh_set_visible_instances(multimesh, -1);
} else {
- if (VS::get_singleton()->is_connected("frame_pre_draw", this, "_update_render_thread")) {
- VS::get_singleton()->disconnect("frame_pre_draw", this, "_update_render_thread");
+ if (VS::get_singleton()->is_connected_compat("frame_pre_draw", this, "_update_render_thread")) {
+ VS::get_singleton()->disconnect_compat("frame_pre_draw", this, "_update_render_thread");
}
VS::get_singleton()->canvas_item_set_update_when_visible(get_canvas_item(), false);
diff --git a/scene/2d/light_occluder_2d.cpp b/scene/2d/light_occluder_2d.cpp
index c000346a1a..019eeb9563 100644
--- a/scene/2d/light_occluder_2d.cpp
+++ b/scene/2d/light_occluder_2d.cpp
@@ -234,7 +234,7 @@ void LightOccluder2D::set_occluder_polygon(const Ref<OccluderPolygon2D> &p_polyg
#ifdef DEBUG_ENABLED
if (occluder_polygon.is_valid())
- occluder_polygon->disconnect("changed", this, "_poly_changed");
+ occluder_polygon->disconnect_compat("changed", this, "_poly_changed");
#endif
occluder_polygon = p_polygon;
@@ -245,7 +245,7 @@ void LightOccluder2D::set_occluder_polygon(const Ref<OccluderPolygon2D> &p_polyg
#ifdef DEBUG_ENABLED
if (occluder_polygon.is_valid())
- occluder_polygon->connect("changed", this, "_poly_changed");
+ occluder_polygon->connect_compat("changed", this, "_poly_changed");
update();
#endif
}
diff --git a/scene/2d/line_2d.cpp b/scene/2d/line_2d.cpp
index 3c457b7df0..0aadc84091 100644
--- a/scene/2d/line_2d.cpp
+++ b/scene/2d/line_2d.cpp
@@ -101,14 +101,14 @@ float Line2D::get_width() const {
void Line2D::set_curve(const Ref<Curve> &p_curve) {
// Cleanup previous connection if any
if (_curve.is_valid()) {
- _curve->disconnect(CoreStringNames::get_singleton()->changed, this, "_curve_changed");
+ _curve->disconnect_compat(CoreStringNames::get_singleton()->changed, this, "_curve_changed");
}
_curve = p_curve;
// Connect to the curve so the line will update when it is changed
if (_curve.is_valid()) {
- _curve->connect(CoreStringNames::get_singleton()->changed, this, "_curve_changed");
+ _curve->connect_compat(CoreStringNames::get_singleton()->changed, this, "_curve_changed");
}
update();
@@ -171,14 +171,14 @@ void Line2D::set_gradient(const Ref<Gradient> &p_gradient) {
// Cleanup previous connection if any
if (_gradient.is_valid()) {
- _gradient->disconnect(CoreStringNames::get_singleton()->changed, this, "_gradient_changed");
+ _gradient->disconnect_compat(CoreStringNames::get_singleton()->changed, this, "_gradient_changed");
}
_gradient = p_gradient;
// Connect to the gradient so the line will update when the ColorRamp is changed
if (_gradient.is_valid()) {
- _gradient->connect(CoreStringNames::get_singleton()->changed, this, "_gradient_changed");
+ _gradient->connect_compat(CoreStringNames::get_singleton()->changed, this, "_gradient_changed");
}
update();
diff --git a/scene/2d/navigation_polygon.cpp b/scene/2d/navigation_polygon.cpp
index 678e5f113a..6754c1c9a6 100644
--- a/scene/2d/navigation_polygon.cpp
+++ b/scene/2d/navigation_polygon.cpp
@@ -503,14 +503,14 @@ void NavigationPolygonInstance::set_navigation_polygon(const Ref<NavigationPolyg
}
if (navpoly.is_valid()) {
- navpoly->disconnect(CoreStringNames::get_singleton()->changed, this, "_navpoly_changed");
+ navpoly->disconnect_compat(CoreStringNames::get_singleton()->changed, this, "_navpoly_changed");
}
navpoly = p_navpoly;
Navigation2DServer::get_singleton()->region_set_navpoly(region, p_navpoly);
if (navpoly.is_valid()) {
- navpoly->connect(CoreStringNames::get_singleton()->changed, this, "_navpoly_changed");
+ navpoly->connect_compat(CoreStringNames::get_singleton()->changed, this, "_navpoly_changed");
}
_navpoly_changed();
diff --git a/scene/2d/path_2d.cpp b/scene/2d/path_2d.cpp
index d83c163b4c..3e417e7f5d 100644
--- a/scene/2d/path_2d.cpp
+++ b/scene/2d/path_2d.cpp
@@ -134,13 +134,13 @@ void Path2D::_curve_changed() {
void Path2D::set_curve(const Ref<Curve2D> &p_curve) {
if (curve.is_valid()) {
- curve->disconnect("changed", this, "_curve_changed");
+ curve->disconnect_compat("changed", this, "_curve_changed");
}
curve = p_curve;
if (curve.is_valid()) {
- curve->connect("changed", this, "_curve_changed");
+ curve->connect_compat("changed", this, "_curve_changed");
}
_curve_changed();
diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp
index 29bfc39477..e4d50db147 100644
--- a/scene/2d/physics_body_2d.cpp
+++ b/scene/2d/physics_body_2d.cpp
@@ -192,14 +192,14 @@ real_t StaticBody2D::get_constant_angular_velocity() const {
void StaticBody2D::set_physics_material_override(const Ref<PhysicsMaterial> &p_physics_material_override) {
if (physics_material_override.is_valid()) {
- if (physics_material_override->is_connected(CoreStringNames::get_singleton()->changed, this, "_reload_physics_characteristics"))
- physics_material_override->disconnect(CoreStringNames::get_singleton()->changed, this, "_reload_physics_characteristics");
+ if (physics_material_override->is_connected_compat(CoreStringNames::get_singleton()->changed, this, "_reload_physics_characteristics"))
+ physics_material_override->disconnect_compat(CoreStringNames::get_singleton()->changed, this, "_reload_physics_characteristics");
}
physics_material_override = p_physics_material_override;
if (physics_material_override.is_valid()) {
- physics_material_override->connect(CoreStringNames::get_singleton()->changed, this, "_reload_physics_characteristics");
+ physics_material_override->connect_compat(CoreStringNames::get_singleton()->changed, this, "_reload_physics_characteristics");
}
_reload_physics_characteristics();
}
@@ -311,8 +311,8 @@ void RigidBody2D::_body_inout(int p_status, ObjectID p_instance, int p_body_shap
//E->get().rc=0;
E->get().in_scene = node && node->is_inside_tree();
if (node) {
- node->connect(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree, make_binds(objid));
- node->connect(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree, make_binds(objid));
+ node->connect_compat(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree, make_binds(objid));
+ node->connect_compat(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree, make_binds(objid));
if (E->get().in_scene) {
emit_signal(SceneStringNames::get_singleton()->body_entered, node);
}
@@ -340,8 +340,8 @@ void RigidBody2D::_body_inout(int p_status, ObjectID p_instance, int p_body_shap
if (E->get().shapes.empty()) {
if (node) {
- node->disconnect(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree);
- node->disconnect(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree);
+ node->disconnect_compat(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree);
+ node->disconnect_compat(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree);
if (in_scene)
emit_signal(SceneStringNames::get_singleton()->body_exited, node);
}
@@ -545,14 +545,14 @@ real_t RigidBody2D::get_weight() const {
void RigidBody2D::set_physics_material_override(const Ref<PhysicsMaterial> &p_physics_material_override) {
if (physics_material_override.is_valid()) {
- if (physics_material_override->is_connected(CoreStringNames::get_singleton()->changed, this, "_reload_physics_characteristics"))
- physics_material_override->disconnect(CoreStringNames::get_singleton()->changed, this, "_reload_physics_characteristics");
+ if (physics_material_override->is_connected_compat(CoreStringNames::get_singleton()->changed, this, "_reload_physics_characteristics"))
+ physics_material_override->disconnect_compat(CoreStringNames::get_singleton()->changed, this, "_reload_physics_characteristics");
}
physics_material_override = p_physics_material_override;
if (physics_material_override.is_valid()) {
- physics_material_override->connect(CoreStringNames::get_singleton()->changed, this, "_reload_physics_characteristics");
+ physics_material_override->connect_compat(CoreStringNames::get_singleton()->changed, this, "_reload_physics_characteristics");
}
_reload_physics_characteristics();
}
@@ -775,8 +775,8 @@ void RigidBody2D::set_contact_monitor(bool p_enabled) {
if (node) {
- node->disconnect(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree);
- node->disconnect(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree);
+ node->disconnect_compat(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree);
+ node->disconnect_compat(SceneStringNames::get_singleton()->tree_exiting, this, SceneStringNames::get_singleton()->_body_exit_tree);
}
}
diff --git a/scene/2d/polygon_2d.cpp b/scene/2d/polygon_2d.cpp
index 67269134ef..eb8b053301 100644
--- a/scene/2d/polygon_2d.cpp
+++ b/scene/2d/polygon_2d.cpp
@@ -120,11 +120,11 @@ void Polygon2D::_notification(int p_what) {
if (new_skeleton_id != current_skeleton_id) {
Object *old_skeleton = ObjectDB::get_instance(current_skeleton_id);
if (old_skeleton) {
- old_skeleton->disconnect("bone_setup_changed", this, "_skeleton_bone_setup_changed");
+ old_skeleton->disconnect_compat("bone_setup_changed", this, "_skeleton_bone_setup_changed");
}
if (skeleton_node) {
- skeleton_node->connect("bone_setup_changed", this, "_skeleton_bone_setup_changed");
+ skeleton_node->connect_compat("bone_setup_changed", this, "_skeleton_bone_setup_changed");
}
current_skeleton_id = new_skeleton_id;
diff --git a/scene/2d/sprite.cpp b/scene/2d/sprite.cpp
index 2fe39ca104..fac2e7cd46 100644
--- a/scene/2d/sprite.cpp
+++ b/scene/2d/sprite.cpp
@@ -142,12 +142,12 @@ void Sprite::set_texture(const Ref<Texture2D> &p_texture) {
return;
if (texture.is_valid())
- texture->disconnect(CoreStringNames::get_singleton()->changed, this, "_texture_changed");
+ texture->disconnect_compat(CoreStringNames::get_singleton()->changed, this, "_texture_changed");
texture = p_texture;
if (texture.is_valid())
- texture->connect(CoreStringNames::get_singleton()->changed, this, "_texture_changed");
+ texture->connect_compat(CoreStringNames::get_singleton()->changed, this, "_texture_changed");
update();
emit_signal("texture_changed");
diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp
index 57b11fa069..0ce11ee75d 100644
--- a/scene/2d/tile_map.cpp
+++ b/scene/2d/tile_map.cpp
@@ -177,7 +177,7 @@ void TileMap::_update_quadrant_transform() {
void TileMap::set_tileset(const Ref<TileSet> &p_tileset) {
if (tile_set.is_valid()) {
- tile_set->disconnect("changed", this, "_recreate_quadrants");
+ tile_set->disconnect_compat("changed", this, "_recreate_quadrants");
tile_set->remove_change_receptor(this);
}
@@ -185,7 +185,7 @@ void TileMap::set_tileset(const Ref<TileSet> &p_tileset) {
tile_set = p_tileset;
if (tile_set.is_valid()) {
- tile_set->connect("changed", this, "_recreate_quadrants");
+ tile_set->connect_compat("changed", this, "_recreate_quadrants");
tile_set->add_change_receptor(this);
} else {
clear();
@@ -853,7 +853,7 @@ void TileMap::_set_celld(const Vector2 &p_pos, const Dictionary &p_data) {
Variant v_pos_x = p_pos.x, v_pos_y = p_pos.y, v_tile = p_data["id"], v_flip_h = p_data["flip_h"], v_flip_v = p_data["flip_y"], v_transpose = p_data["transpose"], v_autotile_coord = p_data["auto_coord"];
const Variant *args[7] = { &v_pos_x, &v_pos_y, &v_tile, &v_flip_h, &v_flip_v, &v_transpose, &v_autotile_coord };
- Variant::CallError ce;
+ Callable::CallError ce;
call("set_cell", args, 7, ce);
}
diff --git a/scene/2d/touch_screen_button.cpp b/scene/2d/touch_screen_button.cpp
index beff74f496..7ca165985e 100644
--- a/scene/2d/touch_screen_button.cpp
+++ b/scene/2d/touch_screen_button.cpp
@@ -69,12 +69,12 @@ Ref<BitMap> TouchScreenButton::get_bitmask() const {
void TouchScreenButton::set_shape(const Ref<Shape2D> &p_shape) {
if (shape.is_valid())
- shape->disconnect("changed", this, "update");
+ shape->disconnect_compat("changed", this, "update");
shape = p_shape;
if (shape.is_valid())
- shape->connect("changed", this, "update");
+ shape->connect_compat("changed", this, "update");
update();
}
@@ -404,7 +404,7 @@ void TouchScreenButton::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "shape_centered"), "set_shape_centered", "is_shape_centered");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "shape_visible"), "set_shape_visible", "is_shape_visible");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "passby_press"), "set_passby_press", "is_passby_press_enabled");
- ADD_PROPERTY(PropertyInfo(Variant::STRING, "action"), "set_action", "get_action");
+ ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "action"), "set_action", "get_action");
ADD_PROPERTY(PropertyInfo(Variant::INT, "visibility_mode", PROPERTY_HINT_ENUM, "Always,TouchScreen Only"), "set_visibility_mode", "get_visibility_mode");
ADD_SIGNAL(MethodInfo("pressed"));
diff --git a/scene/2d/visibility_notifier_2d.cpp b/scene/2d/visibility_notifier_2d.cpp
index 0ac725b7dd..3bfaf1f95c 100644
--- a/scene/2d/visibility_notifier_2d.cpp
+++ b/scene/2d/visibility_notifier_2d.cpp
@@ -224,7 +224,7 @@ void VisibilityEnabler2D::_find_nodes(Node *p_node) {
if (add) {
- p_node->connect(SceneStringNames::get_singleton()->tree_exiting, this, "_node_removed", varray(p_node), CONNECT_ONESHOT);
+ p_node->connect_compat(SceneStringNames::get_singleton()->tree_exiting, this, "_node_removed", varray(p_node), CONNECT_ONESHOT);
nodes[p_node] = meta;
_change_node_state(p_node, false);
}
@@ -267,7 +267,7 @@ void VisibilityEnabler2D::_notification(int p_what) {
if (!visible)
_change_node_state(E->key(), true);
- E->key()->disconnect(SceneStringNames::get_singleton()->tree_exiting, this, "_node_removed");
+ E->key()->disconnect_compat(SceneStringNames::get_singleton()->tree_exiting, this, "_node_removed");
}
nodes.clear();