diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2016-06-26 09:43:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-26 09:43:45 +0200 |
commit | b02d67be308a9f756a9447afe14ed276a18813d2 (patch) | |
tree | 4695473cf122dc1d703737d1d84b1490b3d23f6c /scene/2d | |
parent | 620da09b8714b446b2fc2fb0a9d897ce502f0377 (diff) | |
parent | 79c500bee1bb53164a78855419eca8543193f77f (diff) |
Merge pull request #5307 from MarianoGnu/master
TextureRegion improvements
Diffstat (limited to 'scene/2d')
-rw-r--r-- | scene/2d/sprite.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scene/2d/sprite.cpp b/scene/2d/sprite.cpp index 3e6384ea2c..27aa08ec5b 100644 --- a/scene/2d/sprite.cpp +++ b/scene/2d/sprite.cpp @@ -120,6 +120,7 @@ void Sprite::set_texture(const Ref<Texture>& p_texture) { } #endif update(); + emit_signal("texture_changed"); item_rect_changed(); } @@ -323,6 +324,7 @@ void Sprite::_bind_methods() { ObjectTypeDB::bind_method(_MD("get_modulate"),&Sprite::get_modulate); ADD_SIGNAL(MethodInfo("frame_changed")); + ADD_SIGNAL(MethodInfo("texture_changed")); ADD_PROPERTYNZ( PropertyInfo( Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE,"Texture"), _SCS("set_texture"),_SCS("get_texture")); ADD_PROPERTYNO( PropertyInfo( Variant::BOOL, "centered"), _SCS("set_centered"),_SCS("is_centered")); |