summaryrefslogtreecommitdiffstats
path: root/scene/2d/sprite.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-01-08 12:31:14 -0300
committerJuan Linietsky <reduzio@gmail.com>2017-01-08 12:31:14 -0300
commit8ecc34bfaeb6b444333c0aa2412e412f6423915d (patch)
tree052418f9cc28956565f9df6796f65551d04b9b20 /scene/2d/sprite.cpp
parentd9ca9d778db3e49e2f3376881b4ca11eb6d6d172 (diff)
downloadredot-engine-8ecc34bfaeb6b444333c0aa2412e412f6423915d.tar.gz
removed unnecesary modulate funtions, which were superseded by self_modulate
Diffstat (limited to 'scene/2d/sprite.cpp')
-rw-r--r--scene/2d/sprite.cpp19
1 files changed, 1 insertions, 18 deletions
diff --git a/scene/2d/sprite.cpp b/scene/2d/sprite.cpp
index 480991c71d..8bad8fcb38 100644
--- a/scene/2d/sprite.cpp
+++ b/scene/2d/sprite.cpp
@@ -97,7 +97,7 @@ void Sprite::_notification(int p_what) {
if (vflip)
dst_rect.size.y=-dst_rect.size.y;
- texture->draw_rect_region(ci,dst_rect,src_rect,modulate);
+ texture->draw_rect_region(ci,dst_rect,src_rect);
} break;
}
@@ -249,16 +249,6 @@ int Sprite::get_hframes() const {
return hframes;
}
-void Sprite::set_modulate(const Color& p_color) {
-
- modulate=p_color;
- update();
-}
-
-Color Sprite::get_modulate() const{
-
- return modulate;
-}
Rect2 Sprite::get_item_rect() const {
@@ -332,9 +322,6 @@ void Sprite::_bind_methods() {
ClassDB::bind_method(_MD("set_hframes","hframes"),&Sprite::set_hframes);
ClassDB::bind_method(_MD("get_hframes"),&Sprite::get_hframes);
- ClassDB::bind_method(_MD("set_modulate","modulate"),&Sprite::set_modulate);
- ClassDB::bind_method(_MD("get_modulate"),&Sprite::get_modulate);
-
ADD_SIGNAL(MethodInfo("frame_changed"));
ADD_SIGNAL(MethodInfo("texture_changed"));
@@ -346,7 +333,6 @@ void Sprite::_bind_methods() {
ADD_PROPERTYNO( PropertyInfo( Variant::INT, "vframes",PROPERTY_HINT_RANGE,"1,16384,1"), _SCS("set_vframes"),_SCS("get_vframes"));
ADD_PROPERTYNO( PropertyInfo( Variant::INT, "hframes",PROPERTY_HINT_RANGE,"1,16384,1"), _SCS("set_hframes"),_SCS("get_hframes"));
ADD_PROPERTYNZ( PropertyInfo( Variant::INT, "frame",PROPERTY_HINT_SPRITE_FRAME), _SCS("set_frame"),_SCS("get_frame"));
- ADD_PROPERTYNO( PropertyInfo( Variant::COLOR, "modulate"), _SCS("set_modulate"),_SCS("get_modulate"));
ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "region"), _SCS("set_region"),_SCS("is_region"));
ADD_PROPERTYNZ( PropertyInfo( Variant::RECT2, "region_rect"), _SCS("set_region_rect"),_SCS("get_region_rect"));
@@ -364,9 +350,6 @@ Sprite::Sprite() {
vframes=1;
hframes=1;
- modulate=Color(1,1,1,1);
-
-
}