diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-02-21 23:26:13 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2020-02-28 14:24:09 +0100 |
commit | f742dabafee7f54e1b77148d547e2031d7cc535e (patch) | |
tree | 5aab3c9c4b9aca10d190a7efa600afb8c7aef213 /scene/gui/texture_rect.cpp | |
parent | 01afc442c73661df677c2b93f4037a21992ee45b (diff) |
Signals: Manually port most of remaining connect_compat uses
It's tedious work...
Some can't be ported as they depend on private or protected methods
of different classes, which is not supported by callable_mp (even if
it's a class inherited by the current one).
Diffstat (limited to 'scene/gui/texture_rect.cpp')
-rw-r--r-- | scene/gui/texture_rect.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/scene/gui/texture_rect.cpp b/scene/gui/texture_rect.cpp index 87442f32e8..6dafd3bf4f 100644 --- a/scene/gui/texture_rect.cpp +++ b/scene/gui/texture_rect.cpp @@ -127,7 +127,6 @@ void TextureRect::_bind_methods() { ClassDB::bind_method(D_METHOD("is_flipped_v"), &TextureRect::is_flipped_v); ClassDB::bind_method(D_METHOD("set_stretch_mode", "stretch_mode"), &TextureRect::set_stretch_mode); ClassDB::bind_method(D_METHOD("get_stretch_mode"), &TextureRect::get_stretch_mode); - ClassDB::bind_method(D_METHOD("_texture_changed"), &TextureRect::_texture_changed); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_texture", "get_texture"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "expand"), "set_expand", "has_expand"); @@ -160,13 +159,13 @@ void TextureRect::set_texture(const Ref<Texture2D> &p_tex) { } if (texture.is_valid()) { - texture->disconnect_compat(CoreStringNames::get_singleton()->changed, this, "_texture_changed"); + texture->disconnect(CoreStringNames::get_singleton()->changed, callable_mp(this, &TextureRect::_texture_changed)); } texture = p_tex; if (texture.is_valid()) { - texture->connect_compat(CoreStringNames::get_singleton()->changed, this, "_texture_changed"); + texture->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &TextureRect::_texture_changed)); } update(); |