From b832003c6b04c4435052a60c8db30399ca44b2c2 Mon Sep 17 00:00:00 2001 From: Marcel Admiraal Date: Wed, 23 Dec 2020 07:06:30 +0000 Subject: [PATCH] Rename Control rotation to rotation_degrees --- doc/classes/Control.xml | 21 ++++----------------- scene/gui/control.cpp | 3 ++- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index 14d44a2fbeaee..3678cdb29e5bb 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -454,13 +454,6 @@ Returns the position and size of the control relative to the top-left corner of the parent Control. See [member rect_position] and [member rect_size]. - - - - - Returns the rotation (in radians). - - @@ -981,15 +974,6 @@ If [code]keep_margins[/code] is [code]true[/code], control's anchors will be updated instead of margins. - - - - - - - Sets the rotation (in radians). - - @@ -1117,7 +1101,10 @@ The node's position, relative to its parent. It corresponds to the rectangle's top-left corner. The property is not affected by [member rect_pivot_offset]. - + + The node's rotation around its pivot, in radians. See [member rect_pivot_offset] to change the pivot's position. + + The node's rotation around its pivot, in degrees. See [member rect_pivot_offset] to change the pivot's position. diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index bc37045386c16..f69b124024b0b 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -2913,7 +2913,8 @@ void Control::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "rect_global_position", PROPERTY_HINT_NONE, "", 0), "_set_global_position", "get_global_position"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "rect_size", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "_set_size", "get_size"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "rect_min_size"), "set_custom_minimum_size", "get_custom_minimum_size"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "rect_rotation", PROPERTY_HINT_RANGE, "-360,360,0.1,or_lesser,or_greater"), "set_rotation_degrees", "get_rotation_degrees"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "rect_rotation", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_rotation", "get_rotation"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "rect_rotation_degrees", PROPERTY_HINT_RANGE, "-360,360,0.1,or_lesser,or_greater"), "set_rotation_degrees", "get_rotation_degrees"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "rect_scale"), "set_scale", "get_scale"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "rect_pivot_offset"), "set_pivot_offset", "get_pivot_offset"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "rect_clip_content"), "set_clip_contents", "is_clipping_contents");