diff options
author | Juan Linietsky <reduzio@gmail.com> | 2015-03-22 10:39:32 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2015-03-22 10:39:32 -0300 |
commit | 92ab362afae275ac26ba24db88395d6d4977515d (patch) | |
tree | 732192f4b96e27bd15180cd549f8959420a99c7d /scene | |
parent | a93e33f5c8afc8ce2e9c1674718ff103bfae49b0 (diff) |
avoid function naming conflict on light scale
Diffstat (limited to 'scene')
-rw-r--r-- | scene/2d/light_2d.cpp | 10 | ||||
-rw-r--r-- | scene/2d/light_2d.h | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/scene/2d/light_2d.cpp b/scene/2d/light_2d.cpp index 949c952b39..4abb7e5436 100644 --- a/scene/2d/light_2d.cpp +++ b/scene/2d/light_2d.cpp @@ -96,7 +96,7 @@ float Light2D::get_height() const { return height; } -void Light2D::set_scale( float p_scale) { +void Light2D::set_texture_scale( float p_scale) { _scale=p_scale; VS::get_singleton()->canvas_light_set_scale(canvas_light,_scale); @@ -105,7 +105,7 @@ void Light2D::set_scale( float p_scale) { } -float Light2D::get_scale() const { +float Light2D::get_texture_scale() const { return _scale; } @@ -260,8 +260,8 @@ void Light2D::_bind_methods() { ObjectTypeDB::bind_method(_MD("set_height","height"),&Light2D::set_height); ObjectTypeDB::bind_method(_MD("get_height"),&Light2D::get_height); - ObjectTypeDB::bind_method(_MD("set_scale","scale"),&Light2D::set_scale); - ObjectTypeDB::bind_method(_MD("get_scale"),&Light2D::get_scale); + ObjectTypeDB::bind_method(_MD("set_texture_scale","texture_scale"),&Light2D::set_texture_scale); + ObjectTypeDB::bind_method(_MD("get_texture_scale"),&Light2D::get_texture_scale); ObjectTypeDB::bind_method(_MD("set_z_range_min","z"),&Light2D::set_z_range_min); @@ -298,7 +298,7 @@ void Light2D::_bind_methods() { ADD_PROPERTY( PropertyInfo(Variant::BOOL,"enabled"),_SCS("set_enabled"),_SCS("is_enabled")); ADD_PROPERTY( PropertyInfo(Variant::OBJECT,"texture",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_texture"),_SCS("get_texture")); ADD_PROPERTY( PropertyInfo(Variant::VECTOR2,"offset"),_SCS("set_texture_offset"),_SCS("get_texture_offset")); - ADD_PROPERTY( PropertyInfo(Variant::REAL,"scale",PROPERTY_HINT_RANGE,"0.01,4096,0.01"),_SCS("set_scale"),_SCS("get_scale")); + ADD_PROPERTY( PropertyInfo(Variant::REAL,"scale",PROPERTY_HINT_RANGE,"0.01,4096,0.01"),_SCS("set_texture_scale"),_SCS("get_texture_scale")); ADD_PROPERTY( PropertyInfo(Variant::COLOR,"color"),_SCS("set_color"),_SCS("get_color")); ADD_PROPERTY( PropertyInfo(Variant::BOOL,"subtract"),_SCS("set_subtract_mode"),_SCS("get_subtract_mode")); ADD_PROPERTY( PropertyInfo(Variant::REAL,"range/height"),_SCS("set_height"),_SCS("get_height")); diff --git a/scene/2d/light_2d.h b/scene/2d/light_2d.h index 95196af5e0..6cfb055fa9 100644 --- a/scene/2d/light_2d.h +++ b/scene/2d/light_2d.h @@ -51,8 +51,8 @@ public: void set_height( float p_height); float get_height() const; - void set_scale( float p_scale); - float get_scale() const; + void set_texture_scale( float p_scale); + float get_texture_scale() const; void set_z_range_min( int p_min_z); int get_z_range_min() const; |