diff options
author | Juan Linietsky <red@kyoko> | 2015-06-12 13:53:18 -0300 |
---|---|---|
committer | Juan Linietsky <red@kyoko> | 2015-06-12 13:53:18 -0300 |
commit | 8945670bc0657c342f3f5106f757a6ac360de4c4 (patch) | |
tree | 7994184ff2167d2ae22fbba7a15d7138db75e032 /scene/2d | |
parent | 4b35654a023e4fdcd3e3b12570ffdf3f11aeeb3d (diff) |
made changing pivot simpler in 2D nodes (just press v with mouse over position)
Diffstat (limited to 'scene/2d')
-rw-r--r-- | scene/2d/animated_sprite.cpp | 6 | ||||
-rw-r--r-- | scene/2d/sprite.cpp | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/scene/2d/animated_sprite.cpp b/scene/2d/animated_sprite.cpp index b49426f7e2..e350a34013 100644 --- a/scene/2d/animated_sprite.cpp +++ b/scene/2d/animated_sprite.cpp @@ -149,11 +149,11 @@ void AnimatedSprite::_notification(int p_what) { Size2i s; s = texture->get_size(); - Point2i ofs=offset; + Point2 ofs=offset; if (centered) ofs-=s/2; - Rect2i dst_rect(ofs,s); + Rect2 dst_rect(ofs,s); if (hflip) dst_rect.size.x=-dst_rect.size.x; @@ -284,7 +284,7 @@ Rect2 AnimatedSprite::get_item_rect() const { return Node2D::get_item_rect(); Size2i s = t->get_size(); - Point2i ofs=offset; + Point2 ofs=offset; if (centered) ofs-=s/2; diff --git a/scene/2d/sprite.cpp b/scene/2d/sprite.cpp index 067b4794b4..0485033691 100644 --- a/scene/2d/sprite.cpp +++ b/scene/2d/sprite.cpp @@ -82,7 +82,7 @@ void Sprite::_notification(int p_what) { } - Point2i ofs=offset; + Point2 ofs=offset; if (centered) ofs-=s/2; @@ -265,7 +265,7 @@ Rect2 Sprite::get_item_rect() const { s=s/Point2(hframes,vframes); } - Point2i ofs=offset; + Point2 ofs=offset; if (centered) ofs-=s/2; @@ -413,11 +413,11 @@ void ViewportSprite::_notification(int p_what) { src_rect.size=s; - Point2i ofs=offset; + Point2 ofs=offset; if (centered) ofs-=s/2; - Rect2i dst_rect(ofs,s); + Rect2 dst_rect(ofs,s); texture->draw_rect_region(ci,dst_rect,src_rect,modulate); } break; @@ -505,7 +505,7 @@ Rect2 ViewportSprite::get_item_rect() const { Size2i s; s = texture->get_size(); - Point2i ofs=offset; + Point2 ofs=offset; if (centered) ofs-=s/2; |