summaryrefslogtreecommitdiff
path: root/scene/resources/texture.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources/texture.cpp')
-rw-r--r--scene/resources/texture.cpp12
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();