diff options
Diffstat (limited to 'scene/2d/sprite.cpp')
-rw-r--r-- | scene/2d/sprite.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scene/2d/sprite.cpp b/scene/2d/sprite.cpp index 9f789a7a1f..82f5a6972a 100644 --- a/scene/2d/sprite.cpp +++ b/scene/2d/sprite.cpp @@ -34,6 +34,7 @@ void Sprite::edit_set_pivot(const Point2& p_pivot) { set_offset(p_pivot); + } Point2 Sprite::edit_get_pivot() const { @@ -136,6 +137,7 @@ void Sprite::set_offset(const Point2& p_offset) { offset=p_offset; update(); item_rect_changed(); + _change_notify("offset"); } Point2 Sprite::get_offset() const { @@ -199,6 +201,8 @@ void Sprite::set_frame(int p_frame) { item_rect_changed(); frame=p_frame; + + emit_signal(SceneStringNames::get_singleton()->frame_changed); } int Sprite::get_frame() const { @@ -307,6 +311,8 @@ void Sprite::_bind_methods() { ObjectTypeDB::bind_method(_MD("set_modulate","modulate"),&Sprite::set_modulate); ObjectTypeDB::bind_method(_MD("get_modulate"),&Sprite::get_modulate); + ADD_SIGNAL(MethodInfo("frame_changed")); + ADD_PROPERTY( PropertyInfo( Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE,"Texture"), _SCS("set_texture"),_SCS("get_texture")); ADD_PROPERTY( PropertyInfo( Variant::BOOL, "centered"), _SCS("set_centered"),_SCS("is_centered")); ADD_PROPERTY( PropertyInfo( Variant::VECTOR2, "offset"), _SCS("set_offset"),_SCS("get_offset")); |