diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-09-25 17:18:38 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-09-25 17:18:38 +0200 |
commit | e4cfd4e26a7bb497a5fafcf804bae91ead3ac1c2 (patch) | |
tree | 8635d80459d04f392974a0b8fc2967c91450a0e8 /editor/editor_properties_vector.cpp | |
parent | f0a980840f77d464bc14c1d1966865413853d703 (diff) | |
parent | e45927b2f283570c19d207f39ea84fae840b74fe (diff) | |
download | redot-engine-e4cfd4e26a7bb497a5fafcf804bae91ead3ac1c2.tar.gz |
Merge pull request #82195 from AThousandShips/radian_fix
Replace `radians` range hint with `radians_as_degrees`
Diffstat (limited to 'editor/editor_properties_vector.cpp')
-rw-r--r-- | editor/editor_properties_vector.cpp | 8 |
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); |