diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-06-28 21:57:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-28 21:57:39 +0200 |
commit | 0cd049e4112ab8d4ee2ebd6869d114bdf754c3bb (patch) | |
tree | 2993c13de66d344a874af22615e2a13d8feb4134 /scene | |
parent | fed5ebb24b30e61c56206638631245367acf1c73 (diff) | |
parent | d45ad9bc58d7379c07b6e05c21d705bf03ed9fd1 (diff) |
Merge pull request #62494 from TechnoPorg/gradient-fix-precision
Diffstat (limited to 'scene')
-rw-r--r-- | scene/gui/gradient_edit.cpp | 6 | ||||
-rw-r--r-- | scene/gui/gradient_edit.h | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/scene/gui/gradient_edit.cpp b/scene/gui/gradient_edit.cpp index 0690acbe16..9459bed63b 100644 --- a/scene/gui/gradient_edit.cpp +++ b/scene/gui/gradient_edit.cpp @@ -382,7 +382,7 @@ void GradientEdit::_color_changed(const Color &p_color) { emit_signal(SNAME("ramp_changed")); } -void GradientEdit::set_ramp(const Vector<real_t> &p_offsets, const Vector<Color> &p_colors) { +void GradientEdit::set_ramp(const Vector<float> &p_offsets, const Vector<Color> &p_colors) { ERR_FAIL_COND(p_offsets.size() != p_colors.size()); points.clear(); for (int i = 0; i < p_offsets.size(); i++) { @@ -396,8 +396,8 @@ void GradientEdit::set_ramp(const Vector<real_t> &p_offsets, const Vector<Color> update(); } -Vector<real_t> GradientEdit::get_offsets() const { - Vector<real_t> ret; +Vector<float> GradientEdit::get_offsets() const { + Vector<float> ret; for (int i = 0; i < points.size(); i++) { ret.push_back(points[i].offset); } diff --git a/scene/gui/gradient_edit.h b/scene/gui/gradient_edit.h index 4e3c6525f9..3badcd45ba 100644 --- a/scene/gui/gradient_edit.h +++ b/scene/gui/gradient_edit.h @@ -67,8 +67,8 @@ protected: static void _bind_methods(); public: - void set_ramp(const Vector<real_t> &p_offsets, const Vector<Color> &p_colors); - Vector<real_t> get_offsets() const; + void set_ramp(const Vector<float> &p_offsets, const Vector<Color> &p_colors); + Vector<float> get_offsets() const; Vector<Color> get_colors() const; void set_points(Vector<Gradient::Point> &p_points); Vector<Gradient::Point> &get_points(); |