Rotation APIs: Better exposure for degrees methods

Made public the various set/getters for rotations in degrees.
For consistency, renamed the exposed method names to remove the leading
underscore, and kept the old names with a deprecation warning.

Fixes #4511.
This commit is contained in:
Rémi Verschelde
2016-05-06 23:38:08 +02:00
parent e7f78cddc9
commit 4eab767a6f
9 changed files with 149 additions and 69 deletions
+4 -1
View File
@@ -47,6 +47,7 @@ class Node2D : public CanvasItem {
void _update_transform();
// Deprecated, should be removed in a future version.
void _set_rotd(float p_angle);
float _get_rotd() const;
@@ -69,7 +70,8 @@ public:
virtual bool edit_has_pivot() const;
void set_pos(const Point2& p_pos);
void set_rot(float p_angle);
void set_rot(float p_radians);
void set_rotd(float p_degrees);
void set_scale(const Size2& p_scale);
void rotate(float p_radians);
@@ -81,6 +83,7 @@ public:
Point2 get_pos() const;
float get_rot() const;
float get_rotd() const;
Size2 get_scale() const;
Point2 get_global_pos() const;