aboutsummaryrefslogtreecommitdiff
path: root/scene/2d/sprite.cpp
diff options
context:
space:
mode:
authorWill Nations2018-02-16 11:58:27 -0600
committerWill Nations2018-02-19 16:45:11 -0600
commitb0bdb4456b3e1cc989dab1c8f23389ec0bdf425d (patch)
tree031840c86da9a08dd3e0833743340617cb014d81 /scene/2d/sprite.cpp
parentda612c324cec8c4f6bfcef9b35406ea215e699f6 (diff)
downloadgodot-b0bdb4456b3e1cc989dab1c8f23389ec0bdf425d.tar.gz
godot-b0bdb4456b3e1cc989dab1c8f23389ec0bdf425d.tar.zst
godot-b0bdb4456b3e1cc989dab1c8f23389ec0bdf425d.zip
Diffstat (limited to 'scene/2d/sprite.cpp')
-rw-r--r--scene/2d/sprite.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/scene/2d/sprite.cpp b/scene/2d/sprite.cpp
index 9c344b958..bc1cba41d 100644
--- a/scene/2d/sprite.cpp
+++ b/scene/2d/sprite.cpp
@@ -287,7 +287,7 @@ bool Sprite::_edit_is_selected_on_click(const Point2 &p_point, double p_toleranc
return c.a > 0.01;
}
-Rect2 Sprite::_edit_get_rect() const {
+Rect2 Sprite::get_rect() const {
if (texture.is_null())
return Rect2(0, 0, 1, 1);
@@ -364,6 +364,8 @@ void Sprite::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_hframes", "hframes"), &Sprite::set_hframes);
ClassDB::bind_method(D_METHOD("get_hframes"), &Sprite::get_hframes);
+ ClassDB::bind_method(D_METHOD("get_rect"), &Sprite::get_rect);
+
ADD_SIGNAL(MethodInfo("frame_changed"));
ADD_SIGNAL(MethodInfo("texture_changed"));