diff options
author | Micky <micheledevita2@gmail.com> | 2022-08-13 23:21:24 +0200 |
---|---|---|
committer | Micky <micheledevita2@gmail.com> | 2022-08-29 14:59:47 +0200 |
commit | e31bb5ffeb279f704cff1963c2650df7ad3ecdd6 (patch) | |
tree | d116cb0fea6dae856d338b63ab310024b5fc479a /scene/2d/joint_2d.cpp | |
parent | e60086f98b07365d6174677df84c9a22bfb56d15 (diff) |
Rename `CanvasItem.update()` to `queue_redraw()`
Affects a lot of classes. Very thoroughly checked signal connections and deferred calls to this method, add_do_method/add_undo_method calls, and so on.
Also renames the internal `_update_callback()` to `_redraw_callback()` for consistency.
Just a few comments have also been changed to say "redraw".
In CPUParticles2D, there was a private variable with the same name. It has been renamed to `do_redraw`.
Diffstat (limited to 'scene/2d/joint_2d.cpp')
-rw-r--r-- | scene/2d/joint_2d.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/scene/2d/joint_2d.cpp b/scene/2d/joint_2d.cpp index 7b9f7e14ca..89b6f3f9da 100644 --- a/scene/2d/joint_2d.cpp +++ b/scene/2d/joint_2d.cpp @@ -267,7 +267,7 @@ void PinJoint2D::_configure_joint(RID p_joint, PhysicsBody2D *body_a, PhysicsBod void PinJoint2D::set_softness(real_t p_softness) { softness = p_softness; - update(); + queue_redraw(); if (is_configured()) { PhysicsServer2D::get_singleton()->pin_joint_set_param(get_joint(), PhysicsServer2D::PIN_JOINT_SOFTNESS, p_softness); } @@ -321,7 +321,7 @@ void GrooveJoint2D::_configure_joint(RID p_joint, PhysicsBody2D *body_a, Physics void GrooveJoint2D::set_length(real_t p_length) { length = p_length; - update(); + queue_redraw(); } real_t GrooveJoint2D::get_length() const { @@ -330,7 +330,7 @@ real_t GrooveJoint2D::get_length() const { void GrooveJoint2D::set_initial_offset(real_t p_initial_offset) { initial_offset = p_initial_offset; - update(); + queue_redraw(); } real_t GrooveJoint2D::get_initial_offset() const { @@ -387,7 +387,7 @@ void DampedSpringJoint2D::_configure_joint(RID p_joint, PhysicsBody2D *body_a, P void DampedSpringJoint2D::set_length(real_t p_length) { length = p_length; - update(); + queue_redraw(); } real_t DampedSpringJoint2D::get_length() const { @@ -396,7 +396,7 @@ real_t DampedSpringJoint2D::get_length() const { void DampedSpringJoint2D::set_rest_length(real_t p_rest_length) { rest_length = p_rest_length; - update(); + queue_redraw(); if (is_configured()) { PhysicsServer2D::get_singleton()->damped_spring_joint_set_param(get_joint(), PhysicsServer2D::DAMPED_SPRING_REST_LENGTH, p_rest_length ? p_rest_length : length); } @@ -408,7 +408,7 @@ real_t DampedSpringJoint2D::get_rest_length() const { void DampedSpringJoint2D::set_stiffness(real_t p_stiffness) { stiffness = p_stiffness; - update(); + queue_redraw(); if (is_configured()) { PhysicsServer2D::get_singleton()->damped_spring_joint_set_param(get_joint(), PhysicsServer2D::DAMPED_SPRING_STIFFNESS, p_stiffness); } @@ -420,7 +420,7 @@ real_t DampedSpringJoint2D::get_stiffness() const { void DampedSpringJoint2D::set_damping(real_t p_damping) { damping = p_damping; - update(); + queue_redraw(); if (is_configured()) { PhysicsServer2D::get_singleton()->damped_spring_joint_set_param(get_joint(), PhysicsServer2D::DAMPED_SPRING_DAMPING, p_damping); } |