diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-02-21 10:42:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-21 10:42:47 +0100 |
commit | 222516a8154f4b0dbe1264315337367b60989c9e (patch) | |
tree | 81cddb770b3f5e1eebdd1df10188be801175ab2e /scene/2d/sprite.h | |
parent | 4009c017241f197a74fa2422bf1435ea56ee0903 (diff) | |
parent | b0bdb4456b3e1cc989dab1c8f23389ec0bdf425d (diff) |
Merge pull request #16756 from willnationsdev/shifted-rect-sprite
Simplify detection of Sprite clicks
Diffstat (limited to 'scene/2d/sprite.h')
-rw-r--r-- | scene/2d/sprite.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scene/2d/sprite.h b/scene/2d/sprite.h index 0422e0635f..dd3719099f 100644 --- a/scene/2d/sprite.h +++ b/scene/2d/sprite.h @@ -72,7 +72,7 @@ public: virtual Point2 _edit_get_pivot() const; virtual bool _edit_use_pivot() const; virtual bool _edit_is_selected_on_click(const Point2 &p_point, double p_tolerance) const; - virtual Rect2 _edit_get_rect() const; + virtual Rect2 _edit_get_rect() const { return get_rect(); } void set_texture(const Ref<Texture> &p_texture); Ref<Texture> get_texture() const; @@ -110,6 +110,8 @@ public: void set_hframes(int p_amount); int get_hframes() const; + Rect2 get_rect() const; + Sprite(); }; |