diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-02-28 17:19:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-28 17:19:08 +0100 |
commit | 324e5a60dd068cbbff9c433802f8ecb78cff3364 (patch) | |
tree | 41edf077bcafa3c959a417aa4700318d483ff680 /scene/2d/line_2d.cpp | |
parent | a439131c2b06b3d452e5be13530b6d2caa72c1aa (diff) | |
parent | 32ccf306f9a820e2ac5811de7c12e99a736fdf05 (diff) |
Merge pull request #36426 from akien-mga/calling-all-stations
Signals: Port connect calls to use callable_mp
Diffstat (limited to 'scene/2d/line_2d.cpp')
-rw-r--r-- | scene/2d/line_2d.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/scene/2d/line_2d.cpp b/scene/2d/line_2d.cpp index dd0af21c16..873c901c0a 100644 --- a/scene/2d/line_2d.cpp +++ b/scene/2d/line_2d.cpp @@ -29,9 +29,9 @@ /*************************************************************************/ #include "line_2d.h" -#include "line_builder.h" #include "core/core_string_names.h" +#include "line_builder.h" // Needed so we can bind functions VARIANT_ENUM_CAST(Line2D::LineJointMode) @@ -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_compat(CoreStringNames::get_singleton()->changed, this, "_curve_changed"); + _curve->disconnect(CoreStringNames::get_singleton()->changed, callable_mp(this, &Line2D::_curve_changed)); } _curve = p_curve; // Connect to the curve so the line will update when it is changed if (_curve.is_valid()) { - _curve->connect_compat(CoreStringNames::get_singleton()->changed, this, "_curve_changed"); + _curve->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &Line2D::_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_compat(CoreStringNames::get_singleton()->changed, this, "_gradient_changed"); + _gradient->disconnect(CoreStringNames::get_singleton()->changed, callable_mp(this, &Line2D::_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_compat(CoreStringNames::get_singleton()->changed, this, "_gradient_changed"); + _gradient->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &Line2D::_gradient_changed)); } update(); @@ -428,7 +428,4 @@ void Line2D::_bind_methods() { BIND_ENUM_CONSTANT(LINE_TEXTURE_NONE); BIND_ENUM_CONSTANT(LINE_TEXTURE_TILE); BIND_ENUM_CONSTANT(LINE_TEXTURE_STRETCH); - - ClassDB::bind_method(D_METHOD("_gradient_changed"), &Line2D::_gradient_changed); - ClassDB::bind_method(D_METHOD("_curve_changed"), &Line2D::_curve_changed); } |