summaryrefslogtreecommitdiffstats
path: root/editor/editor_properties_vector.cpp
diff options
context:
space:
mode:
authorA Thousand Ships <96648715+AThousandShips@users.noreply.github.com>2023-09-23 16:27:01 +0200
committerA Thousand Ships <96648715+AThousandShips@users.noreply.github.com>2023-09-25 08:50:19 +0200
commite45927b2f283570c19d207f39ea84fae840b74fe (patch)
tree76028443970cc85f5630d65be8b57f2966ddbd66 /editor/editor_properties_vector.cpp
parentc12d63556b5c1da03a00dd4c45c40e60bd8d68c2 (diff)
downloadredot-engine-e45927b2f283570c19d207f39ea84fae840b74fe.tar.gz
Replace `radians` range hint with `radians_as_degrees`
Diffstat (limited to 'editor/editor_properties_vector.cpp')
-rw-r--r--editor/editor_properties_vector.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/editor/editor_properties_vector.cpp b/editor/editor_properties_vector.cpp
index 9e9848f142..82cd703508 100644
--- a/editor/editor_properties_vector.cpp
+++ b/editor/editor_properties_vector.cpp
@@ -71,7 +71,7 @@ void EditorPropertyVectorN::_value_changed(double val, const String &p_name) {
Variant::construct(vector_type, v, nullptr, 0, cerror);
for (int i = 0; i < component_count; i++) {
- if (angle_in_radians) {
+ if (radians_as_degrees) {
v.set(i, Math::deg_to_rad(spin_sliders[i]->get_value()));
} else {
v.set(i, spin_sliders[i]->get_value());
@@ -83,7 +83,7 @@ void EditorPropertyVectorN::_value_changed(double val, const String &p_name) {
void EditorPropertyVectorN::update_property() {
Variant val = get_edited_property_value();
for (int i = 0; i < component_count; i++) {
- if (angle_in_radians) {
+ if (radians_as_degrees) {
spin_sliders[i]->set_value_no_signal(Math::rad_to_deg((real_t)val.get(i)));
} else {
spin_sliders[i]->set_value_no_signal(val.get(i));
@@ -147,8 +147,8 @@ void EditorPropertyVectorN::_notification(int p_what) {
}
}
-void EditorPropertyVectorN::setup(double p_min, double p_max, double p_step, bool p_hide_slider, bool p_link, const String &p_suffix, bool p_angle_in_radians) {
- angle_in_radians = p_angle_in_radians;
+void EditorPropertyVectorN::setup(double p_min, double p_max, double p_step, bool p_hide_slider, bool p_link, const String &p_suffix, bool p_radians_as_degrees) {
+ radians_as_degrees = p_radians_as_degrees;
for (EditorSpinSlider *spin : spin_sliders) {
spin->set_min(p_min);