summaryrefslogtreecommitdiff
path: root/scene/2d/sprite.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/2d/sprite.cpp')
-rw-r--r--scene/2d/sprite.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/scene/2d/sprite.cpp b/scene/2d/sprite.cpp
index a5648053c4..7eaafe5348 100644
--- a/scene/2d/sprite.cpp
+++ b/scene/2d/sprite.cpp
@@ -29,6 +29,7 @@
/*************************************************************************/
#include "sprite.h"
+
#include "core/core_string_names.h"
#include "core/os/os.h"
#include "scene/main/viewport.h"
@@ -142,12 +143,12 @@ void Sprite::set_texture(const Ref<Texture2D> &p_texture) {
return;
if (texture.is_valid())
- texture->disconnect_compat(CoreStringNames::get_singleton()->changed, this, "_texture_changed");
+ texture->disconnect(CoreStringNames::get_singleton()->changed, callable_mp(this, &Sprite::_texture_changed));
texture = p_texture;
if (texture.is_valid())
- texture->connect_compat(CoreStringNames::get_singleton()->changed, this, "_texture_changed");
+ texture->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &Sprite::_texture_changed));
update();
emit_signal("texture_changed");
@@ -492,8 +493,6 @@ void Sprite::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_rect"), &Sprite::get_rect);
- ClassDB::bind_method(D_METHOD("_texture_changed"), &Sprite::_texture_changed);
-
ADD_SIGNAL(MethodInfo("frame_changed"));
ADD_SIGNAL(MethodInfo("texture_changed"));