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/resources/texture.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/resources/texture.cpp')
-rw-r--r-- | scene/resources/texture.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp index 64de19c197..ca5b6fa9d0 100644 --- a/scene/resources/texture.cpp +++ b/scene/resources/texture.cpp @@ -1409,11 +1409,11 @@ void CurveTexture::ensure_default_setup(float p_min, float p_max) { void CurveTexture::set_curve(Ref<Curve> p_curve) { if (_curve != p_curve) { if (_curve.is_valid()) { - _curve->disconnect_compat(CoreStringNames::get_singleton()->changed, this, "_update"); + _curve->disconnect(CoreStringNames::get_singleton()->changed, callable_mp(this, &CurveTexture::_update)); } _curve = p_curve; if (_curve.is_valid()) { - _curve->connect_compat(CoreStringNames::get_singleton()->changed, this, "_update"); + _curve->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &CurveTexture::_update)); } _update(); } @@ -1514,11 +1514,11 @@ void GradientTexture::set_gradient(Ref<Gradient> p_gradient) { if (p_gradient == gradient) return; if (gradient.is_valid()) { - gradient->disconnect_compat(CoreStringNames::get_singleton()->changed, this, "_update"); + gradient->disconnect(CoreStringNames::get_singleton()->changed, callable_mp(this, &GradientTexture::_update)); } gradient = p_gradient; if (gradient.is_valid()) { - gradient->connect_compat(CoreStringNames::get_singleton()->changed, this, "_update"); + gradient->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &GradientTexture::_update)); } _update(); emit_changed(); @@ -1843,8 +1843,6 @@ void AnimatedTexture::_bind_methods() { ClassDB::bind_method(D_METHOD("set_frame_delay", "frame", "delay"), &AnimatedTexture::set_frame_delay); ClassDB::bind_method(D_METHOD("get_frame_delay", "frame"), &AnimatedTexture::get_frame_delay); - ClassDB::bind_method(D_METHOD("_update_proxy"), &AnimatedTexture::_update_proxy); - ADD_PROPERTY(PropertyInfo(Variant::INT, "frames", PROPERTY_HINT_RANGE, "1," + itos(MAX_FRAMES), PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), "set_frames", "get_frames"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "fps", PROPERTY_HINT_RANGE, "0,1024,0.1"), "set_fps", "get_fps"); @@ -1867,7 +1865,7 @@ AnimatedTexture::AnimatedTexture() { fps = 4; prev_ticks = 0; current_frame = 0; - VisualServer::get_singleton()->connect_compat("frame_pre_draw", this, "_update_proxy"); + VisualServer::get_singleton()->connect("frame_pre_draw", callable_mp(this, &AnimatedTexture::_update_proxy)); #ifndef NO_THREADS rw_lock = RWLock::create(); |