summaryrefslogtreecommitdiff
path: root/scene/2d
diff options
context:
space:
mode:
Diffstat (limited to 'scene/2d')
-rw-r--r--scene/2d/area_2d.cpp4
-rw-r--r--scene/2d/node_2d.cpp2
-rw-r--r--scene/2d/node_2d.h4
-rw-r--r--scene/2d/polygon_2d.cpp4
-rw-r--r--scene/2d/polygon_2d.h6
5 files changed, 9 insertions, 11 deletions
diff --git a/scene/2d/area_2d.cpp b/scene/2d/area_2d.cpp
index 71728966fd..e8954b7e98 100644
--- a/scene/2d/area_2d.cpp
+++ b/scene/2d/area_2d.cpp
@@ -650,8 +650,8 @@ void Area2D::_bind_methods() {
ADD_SIGNAL( MethodInfo("body_enter",PropertyInfo(Variant::OBJECT,"body",PROPERTY_HINT_RESOURCE_TYPE,"PhysicsBody2D")));
ADD_SIGNAL( MethodInfo("body_exit",PropertyInfo(Variant::OBJECT,"body",PROPERTY_HINT_RESOURCE_TYPE,"PhysicsBody2D")));
- ADD_SIGNAL( MethodInfo("area_enter_shape",PropertyInfo(Variant::INT,"area_id"),PropertyInfo(Variant::OBJECT,"area",PROPERTY_HINT_RESOURCE_TYPE,"Area2D"),PropertyInfo(Variant::INT,"area_shape"),PropertyInfo(Variant::INT,"area_shape")));
- ADD_SIGNAL( MethodInfo("area_exit_shape",PropertyInfo(Variant::INT,"area_id"),PropertyInfo(Variant::OBJECT,"area",PROPERTY_HINT_RESOURCE_TYPE,"Area2D"),PropertyInfo(Variant::INT,"area_shape"),PropertyInfo(Variant::INT,"area_shape")));
+ ADD_SIGNAL( MethodInfo("area_enter_shape",PropertyInfo(Variant::INT,"area_id"),PropertyInfo(Variant::OBJECT,"area",PROPERTY_HINT_RESOURCE_TYPE,"Area2D"),PropertyInfo(Variant::INT,"area_shape"),PropertyInfo(Variant::INT,"self_shape")));
+ ADD_SIGNAL( MethodInfo("area_exit_shape",PropertyInfo(Variant::INT,"area_id"),PropertyInfo(Variant::OBJECT,"area",PROPERTY_HINT_RESOURCE_TYPE,"Area2D"),PropertyInfo(Variant::INT,"area_shape"),PropertyInfo(Variant::INT,"self_shape")));
ADD_SIGNAL( MethodInfo("area_enter",PropertyInfo(Variant::OBJECT,"area",PROPERTY_HINT_RESOURCE_TYPE,"Area2D")));
ADD_SIGNAL( MethodInfo("area_exit",PropertyInfo(Variant::OBJECT,"area",PROPERTY_HINT_RESOURCE_TYPE,"Area2D")));
diff --git a/scene/2d/node_2d.cpp b/scene/2d/node_2d.cpp
index df43e8e373..b3f925cb14 100644
--- a/scene/2d/node_2d.cpp
+++ b/scene/2d/node_2d.cpp
@@ -253,7 +253,7 @@ void Node2D::global_translate(const Vector2& p_amount) {
set_global_pos( get_global_pos() + p_amount );
}
-void Node2D::scale(const Vector2& p_amount) {
+void Node2D::scale(const Size2& p_amount) {
set_scale( get_scale() * p_amount );
}
diff --git a/scene/2d/node_2d.h b/scene/2d/node_2d.h
index aa8d0ef33c..b31ee08af6 100644
--- a/scene/2d/node_2d.h
+++ b/scene/2d/node_2d.h
@@ -79,7 +79,7 @@ public:
void move_y(float p_delta,bool p_scaled=false);
void translate(const Vector2& p_amount);
void global_translate(const Vector2& p_amount);
- void scale(const Vector2& p_amount);
+ void scale(const Size2& p_amount);
Point2 get_pos() const;
float get_rot() const;
@@ -110,8 +110,6 @@ public:
Matrix32 get_relative_transform_to_parent(const Node *p_parent) const;
-
-
Matrix32 get_transform() const;
Node2D();
diff --git a/scene/2d/polygon_2d.cpp b/scene/2d/polygon_2d.cpp
index cfb87fb998..12893524d1 100644
--- a/scene/2d/polygon_2d.cpp
+++ b/scene/2d/polygon_2d.cpp
@@ -288,12 +288,12 @@ float Polygon2D::_get_texture_rotationd() const{
}
-void Polygon2D::set_texture_scale(const Vector2& p_scale){
+void Polygon2D::set_texture_scale(const Size2& p_scale){
tex_scale=p_scale;
update();
}
-Vector2 Polygon2D::get_texture_scale() const{
+Size2 Polygon2D::get_texture_scale() const{
return tex_scale;
}
diff --git a/scene/2d/polygon_2d.h b/scene/2d/polygon_2d.h
index 04e8aeb6fd..cecb9081f7 100644
--- a/scene/2d/polygon_2d.h
+++ b/scene/2d/polygon_2d.h
@@ -40,7 +40,7 @@ class Polygon2D : public Node2D {
DVector<Color> vertex_colors;
Color color;
Ref<Texture> texture;
- Vector2 tex_scale;
+ Size2 tex_scale;
Vector2 tex_ofs;
bool tex_tile;
float tex_rot;
@@ -81,8 +81,8 @@ public:
void set_texture_rotation(float p_rot);
float get_texture_rotation() const;
- void set_texture_scale(const Vector2& p_scale);
- Vector2 get_texture_scale() const;
+ void set_texture_scale(const Size2& p_scale);
+ Size2 get_texture_scale() const;
void set_invert(bool p_rot);
bool get_invert() const;