summaryrefslogtreecommitdiff
path: root/scene/gui/control.h
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2016-05-06 23:38:08 +0200
committerRémi Verschelde <rverschelde@gmail.com>2016-05-06 23:38:08 +0200
commit4eab767a6fbc746f6a13e976b4e34d566e7cc4cd (patch)
treefb577113bcc70a23d88cfd74141030eb842edb4f /scene/gui/control.h
parente7f78cddc91696bd47b5e5400f0b4b4fd654fd6b (diff)
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.
Diffstat (limited to 'scene/gui/control.h')
-rw-r--r--scene/gui/control.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/scene/gui/control.h b/scene/gui/control.h
index aa9a7612a5..f720185c9d 100644
--- a/scene/gui/control.h
+++ b/scene/gui/control.h
@@ -180,7 +180,8 @@ private:
void _size_changed();
String _get_tooltip() const;
- void _set_rotation_deg(float p_rot);
+ // Deprecated, should be removed in a future version.
+ void _set_rotation_deg(float p_degrees);
float _get_rotation_deg() const;
friend class Viewport;
@@ -275,8 +276,10 @@ public:
Rect2 get_global_rect() const;
Rect2 get_window_rect() const; ///< use with care, as it blocks waiting for the visual server
- void set_rotation(float p_rotation);
+ void set_rotation(float p_radians);
+ void set_rotation_deg(float p_degrees);
float get_rotation() const;
+ float get_rotation_deg() const;
void set_scale(const Vector2& p_scale);
Vector2 get_scale() const;