summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-04-29 15:50:00 +0200
committerGitHub <noreply@github.com>2020-04-29 15:50:00 +0200
commit58435b0c917fd93d4244ed672e7fadd076dae608 (patch)
treeb41bc67f056615084a111fdad09e25033e2d21a0 /editor
parent1d45a269f87ff38e04169e6aa85d9ecd73fb3473 (diff)
parent540156b387270215f513a68b1cf9ffc909ac381b (diff)
Merge pull request #20371 from aaronfranke/vector-lerp
[Core] [Mono] [GDNative] Rename "linear_interpolate" methods to "lerp"
Diffstat (limited to 'editor')
-rw-r--r--editor/animation_bezier_editor.cpp6
-rw-r--r--editor/animation_track_editor_plugins.cpp4
-rw-r--r--editor/debugger/editor_profiler.cpp2
-rw-r--r--editor/debugger/editor_visual_profiler.cpp2
-rw-r--r--editor/editor_help.cpp12
-rw-r--r--editor/editor_themes.cpp50
-rw-r--r--editor/node_3d_editor_gizmos.cpp4
-rw-r--r--editor/plugins/animation_state_machine_editor.cpp2
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp14
-rw-r--r--editor/plugins/node_3d_editor_plugin.cpp8
-rw-r--r--editor/plugins/script_editor_plugin.cpp2
-rw-r--r--editor/rename_dialog.cpp2
12 files changed, 54 insertions, 54 deletions
diff --git a/editor/animation_bezier_editor.cpp b/editor/animation_bezier_editor.cpp
index e6a020bf41..57c63dd40d 100644
--- a/editor/animation_bezier_editor.cpp
+++ b/editor/animation_bezier_editor.cpp
@@ -162,7 +162,7 @@ void AnimationBezierTrackEdit::_draw_track(int p_track, const Color &p_color) {
float c = (t - low_pos.x) / (high_pos.x - low_pos.x);
- h = low_pos.linear_interpolate(high_pos, c).y;
+ h = low_pos.lerp(high_pos, c).y;
}
h = _bezier_h_to_pixel(h);
@@ -201,12 +201,12 @@ void AnimationBezierTrackEdit::_draw_line_clipped(const Vector2 &p_from, const V
if (to.x > p_clip_right) {
float c = (p_clip_right - from.x) / (to.x - from.x);
- to = from.linear_interpolate(to, c);
+ to = from.lerp(to, c);
}
if (from.x < p_clip_left) {
float c = (p_clip_left - from.x) / (to.x - from.x);
- from = from.linear_interpolate(to, c);
+ from = from.lerp(to, c);
}
draw_line(from, to, p_color);
diff --git a/editor/animation_track_editor_plugins.cpp b/editor/animation_track_editor_plugins.cpp
index 695c294ad2..0ce3ab292e 100644
--- a/editor/animation_track_editor_plugins.cpp
+++ b/editor/animation_track_editor_plugins.cpp
@@ -112,13 +112,13 @@ void AnimationTrackEditColor::draw_key_link(int p_index, float p_pixels_sec, int
if (x_from < p_clip_left) {
float c = float(p_clip_left - x_from) / (x_to - x_from);
- color = color.linear_interpolate(color_next, c);
+ color = color.lerp(color_next, c);
x_from = p_clip_left;
}
if (x_to > p_clip_right) {
float c = float(p_clip_right - x_from) / (x_to - x_from);
- color_next = color.linear_interpolate(color_next, c);
+ color_next = color.lerp(color_next, c);
x_to = p_clip_right;
}
diff --git a/editor/debugger/editor_profiler.cpp b/editor/debugger/editor_profiler.cpp
index 1577e24ac0..c7d4e9128a 100644
--- a/editor/debugger/editor_profiler.cpp
+++ b/editor/debugger/editor_profiler.cpp
@@ -136,7 +136,7 @@ Color EditorProfiler::_get_color_from_signature(const StringName &p_signature) c
double rot = ABS(double(p_signature.hash()) / double(0x7FFFFFFF));
Color c;
c.set_hsv(rot, bc.get_s(), bc.get_v());
- return c.linear_interpolate(get_theme_color("base_color", "Editor"), 0.07);
+ return c.lerp(get_theme_color("base_color", "Editor"), 0.07);
}
void EditorProfiler::_item_edited() {
diff --git a/editor/debugger/editor_visual_profiler.cpp b/editor/debugger/editor_visual_profiler.cpp
index d2edba5970..7d2822b1c9 100644
--- a/editor/debugger/editor_visual_profiler.cpp
+++ b/editor/debugger/editor_visual_profiler.cpp
@@ -132,7 +132,7 @@ Color EditorVisualProfiler::_get_color_from_signature(const StringName &p_signat
double rot = ABS(double(p_signature.hash()) / double(0x7FFFFFFF));
Color c;
c.set_hsv(rot, bc.get_s(), bc.get_v());
- return c.linear_interpolate(get_theme_color("base_color", "Editor"), 0.07);
+ return c.lerp(get_theme_color("base_color", "Editor"), 0.07);
}
void EditorVisualProfiler::_item_selected() {
diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp
index 75d1b2595a..8089d463bd 100644
--- a/editor/editor_help.cpp
+++ b/editor/editor_help.cpp
@@ -47,12 +47,12 @@ void EditorHelp::_init_colors() {
title_color = get_theme_color("accent_color", "Editor");
text_color = get_theme_color("default_color", "RichTextLabel");
headline_color = get_theme_color("headline_color", "EditorHelp");
- base_type_color = title_color.linear_interpolate(text_color, 0.5);
+ base_type_color = title_color.lerp(text_color, 0.5);
comment_color = text_color * Color(1, 1, 1, 0.6);
symbol_color = comment_color;
value_color = text_color * Color(1, 1, 1, 0.6);
qualifier_color = text_color * Color(1, 1, 1, 0.8);
- type_color = get_theme_color("accent_color", "Editor").linear_interpolate(text_color, 0.5);
+ type_color = get_theme_color("accent_color", "Editor").lerp(text_color, 0.5);
class_desc->add_theme_color_override("selection_color", get_theme_color("accent_color", "Editor") * Color(1, 1, 1, 0.4));
class_desc->add_theme_constant_override("line_separation", Math::round(5 * EDSCALE));
}
@@ -196,7 +196,7 @@ void EditorHelp::_add_type(const String &p_type, const String &p_enum) {
}
}
const Color text_color = get_theme_color("default_color", "RichTextLabel");
- const Color type_color = get_theme_color("accent_color", "Editor").linear_interpolate(text_color, 0.5);
+ const Color type_color = get_theme_color("accent_color", "Editor").lerp(text_color, 0.5);
class_desc->push_color(type_color);
bool add_array = false;
if (can_ref) {
@@ -1227,9 +1227,9 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt) {
Color font_color_hl = p_rt->get_theme_color("headline_color", "EditorHelp");
Color accent_color = p_rt->get_theme_color("accent_color", "Editor");
Color property_color = p_rt->get_theme_color("property_color", "Editor");
- Color link_color = accent_color.linear_interpolate(font_color_hl, 0.8);
- Color code_color = accent_color.linear_interpolate(font_color_hl, 0.6);
- Color kbd_color = accent_color.linear_interpolate(property_color, 0.6);
+ Color link_color = accent_color.lerp(font_color_hl, 0.8);
+ Color code_color = accent_color.lerp(font_color_hl, 0.6);
+ Color kbd_color = accent_color.lerp(property_color, 0.6);
String bbcode = p_bbcode.dedent().replace("\t", "").replace("\r", "").strip_edges();
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp
index 576ee436de..0ef173f074 100644
--- a/editor/editor_themes.cpp
+++ b/editor/editor_themes.cpp
@@ -337,24 +337,24 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
//Colors
bool dark_theme = EditorSettings::get_singleton()->is_dark_theme();
- const Color dark_color_1 = base_color.linear_interpolate(Color(0, 0, 0, 1), contrast);
- const Color dark_color_2 = base_color.linear_interpolate(Color(0, 0, 0, 1), contrast * 1.5);
- const Color dark_color_3 = base_color.linear_interpolate(Color(0, 0, 0, 1), contrast * 2);
+ const Color dark_color_1 = base_color.lerp(Color(0, 0, 0, 1), contrast);
+ const Color dark_color_2 = base_color.lerp(Color(0, 0, 0, 1), contrast * 1.5);
+ const Color dark_color_3 = base_color.lerp(Color(0, 0, 0, 1), contrast * 2);
const Color background_color = dark_color_2;
// white (dark theme) or black (light theme), will be used to generate the rest of the colors
const Color mono_color = dark_theme ? Color(1, 1, 1) : Color(0, 0, 0);
- const Color contrast_color_1 = base_color.linear_interpolate(mono_color, MAX(contrast, default_contrast));
- const Color contrast_color_2 = base_color.linear_interpolate(mono_color, MAX(contrast * 1.5, default_contrast * 1.5));
+ const Color contrast_color_1 = base_color.lerp(mono_color, MAX(contrast, default_contrast));
+ const Color contrast_color_2 = base_color.lerp(mono_color, MAX(contrast * 1.5, default_contrast * 1.5));
- const Color font_color = mono_color.linear_interpolate(base_color, 0.25);
- const Color font_color_hl = mono_color.linear_interpolate(base_color, 0.15);
+ const Color font_color = mono_color.lerp(base_color, 0.25);
+ const Color font_color_hl = mono_color.lerp(base_color, 0.15);
const Color font_color_disabled = Color(mono_color.r, mono_color.g, mono_color.b, 0.3);
const Color font_color_selection = accent_color * Color(1, 1, 1, 0.4);
- const Color color_disabled = mono_color.inverted().linear_interpolate(base_color, 0.7);
- const Color color_disabled_bg = mono_color.inverted().linear_interpolate(base_color, 0.9);
+ const Color color_disabled = mono_color.inverted().lerp(base_color, 0.7);
+ const Color color_disabled_bg = mono_color.inverted().lerp(base_color, 0.9);
Color icon_color_hover = Color(1, 1, 1) * (dark_theme ? 1.15 : 1.45);
icon_color_hover.a = 1.0;
@@ -391,13 +391,13 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
Color success_color = Color(0.45, 0.95, 0.5);
Color warning_color = Color(1, 0.87, 0.4);
Color error_color = Color(1, 0.47, 0.42);
- Color property_color = font_color.linear_interpolate(Color(0.5, 0.5, 0.5), 0.5);
+ Color property_color = font_color.lerp(Color(0.5, 0.5, 0.5), 0.5);
if (!dark_theme) {
// Darken some colors to be readable on a light background
- success_color = success_color.linear_interpolate(mono_color, 0.35);
- warning_color = warning_color.linear_interpolate(mono_color, 0.35);
- error_color = error_color.linear_interpolate(mono_color, 0.25);
+ success_color = success_color.lerp(mono_color, 0.35);
+ warning_color = warning_color.lerp(mono_color, 0.35);
+ error_color = error_color.lerp(mono_color, 0.25);
}
theme->set_color("success_color", "Editor", success_color);
@@ -434,7 +434,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
editor_register_fonts(theme);
// Highlighted tabs and border width
- Color tab_color = highlight_tabs ? base_color.linear_interpolate(font_color, contrast) : base_color;
+ Color tab_color = highlight_tabs ? base_color.lerp(font_color, contrast) : base_color;
const int border_width = CLAMP(border_size, 0, 3) * EDSCALE;
const int default_margin_size = 4;
@@ -686,7 +686,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_icon("visibility_xray", "PopupMenu", theme->get_icon("GuiVisibilityXray", "EditorIcons"));
theme->set_constant("vseparation", "PopupMenu", (extra_spacing + default_margin_size + 1) * EDSCALE);
- Ref<StyleBoxFlat> sub_inspector_bg = make_flat_stylebox(dark_color_1.linear_interpolate(accent_color, 0.08), 2, 0, 2, 2);
+ Ref<StyleBoxFlat> sub_inspector_bg = make_flat_stylebox(dark_color_1.lerp(accent_color, 0.08), 2, 0, 2, 2);
sub_inspector_bg->set_border_width(MARGIN_LEFT, 2);
sub_inspector_bg->set_border_width(MARGIN_RIGHT, 2);
sub_inspector_bg->set_border_width(MARGIN_BOTTOM, 2);
@@ -763,9 +763,9 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_stylebox("title_button_hover", "Tree", style_tree_title);
theme->set_stylebox("title_button_pressed", "Tree", style_tree_title);
- Color prop_category_color = dark_color_1.linear_interpolate(mono_color, 0.12);
- Color prop_section_color = dark_color_1.linear_interpolate(mono_color, 0.09);
- Color prop_subsection_color = dark_color_1.linear_interpolate(mono_color, 0.06);
+ Color prop_category_color = dark_color_1.lerp(mono_color, 0.12);
+ Color prop_section_color = dark_color_1.lerp(mono_color, 0.09);
+ Color prop_subsection_color = dark_color_1.lerp(mono_color, 0.06);
theme->set_color("prop_category", "Editor", prop_category_color);
theme->set_color("prop_section", "Editor", prop_section_color);
theme->set_color("prop_subsection", "Editor", prop_subsection_color);
@@ -1124,7 +1124,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_icon("toggle_hidden", "FileDialog", theme->get_icon("GuiVisibilityVisible", "EditorIcons"));
// Use a different color for folder icons to make them easier to distinguish from files.
// On a light theme, the icon will be dark, so we need to lighten it before blending it with the accent color.
- theme->set_color("folder_icon_modulate", "FileDialog", (dark_theme ? Color(1, 1, 1) : Color(4.25, 4.25, 4.25)).linear_interpolate(accent_color, 0.7));
+ theme->set_color("folder_icon_modulate", "FileDialog", (dark_theme ? Color(1, 1, 1) : Color(4.25, 4.25, 4.25)).lerp(accent_color, 0.7));
theme->set_color("files_disabled", "FileDialog", font_color_disabled);
// color picker
@@ -1158,13 +1158,13 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
// editor main color
const Color main_color = dark_theme ? Color(0.34, 0.7, 1.0) : Color(0.02, 0.5, 1.0);
- const Color symbol_color = Color(0.34, 0.57, 1.0).linear_interpolate(mono_color, dark_theme ? 0.5 : 0.3);
+ const Color symbol_color = Color(0.34, 0.57, 1.0).lerp(mono_color, dark_theme ? 0.5 : 0.3);
const Color keyword_color = Color(1.0, 0.44, 0.52);
const Color basetype_color = dark_theme ? Color(0.26, 1.0, 0.76) : Color(0.0, 0.76, 0.38);
- const Color type_color = basetype_color.linear_interpolate(mono_color, dark_theme ? 0.4 : 0.3);
- const Color usertype_color = basetype_color.linear_interpolate(mono_color, dark_theme ? 0.7 : 0.5);
+ const Color type_color = basetype_color.lerp(mono_color, dark_theme ? 0.4 : 0.3);
+ const Color usertype_color = basetype_color.lerp(mono_color, dark_theme ? 0.7 : 0.5);
const Color comment_color = dim_color;
- const Color string_color = (dark_theme ? Color(1.0, 0.85, 0.26) : Color(1.0, 0.82, 0.09)).linear_interpolate(mono_color, dark_theme ? 0.5 : 0.3);
+ const Color string_color = (dark_theme ? Color(1.0, 0.85, 0.26) : Color(1.0, 0.82, 0.09)).lerp(mono_color, dark_theme ? 0.5 : 0.3);
const Color te_background_color = dark_theme ? background_color : base_color;
const Color completion_background_color = dark_theme ? base_color : background_color;
@@ -1183,9 +1183,9 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
const Color current_line_color = alpha1;
const Color line_length_guideline_color = dark_theme ? base_color : background_color;
const Color word_highlighted_color = alpha1;
- const Color number_color = basetype_color.linear_interpolate(mono_color, dark_theme ? 0.5 : 0.3);
+ const Color number_color = basetype_color.lerp(mono_color, dark_theme ? 0.5 : 0.3);
const Color function_color = main_color;
- const Color member_variable_color = main_color.linear_interpolate(mono_color, 0.6);
+ const Color member_variable_color = main_color.lerp(mono_color, 0.6);
const Color mark_color = Color(error_color.r, error_color.g, error_color.b, 0.3);
const Color bookmark_color = Color(0.08, 0.49, 0.98);
const Color breakpoint_color = error_color;
diff --git a/editor/node_3d_editor_gizmos.cpp b/editor/node_3d_editor_gizmos.cpp
index 31a8320209..9a5df3e58f 100644
--- a/editor/node_3d_editor_gizmos.cpp
+++ b/editor/node_3d_editor_gizmos.cpp
@@ -2827,10 +2827,10 @@ void DecalGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
lines.push_back(a);
lines.push_back(b);
} else {
- Vector3 ah = a.linear_interpolate(b, 0.2);
+ Vector3 ah = a.lerp(b, 0.2);
lines.push_back(a);
lines.push_back(ah);
- Vector3 bh = b.linear_interpolate(a, 0.2);
+ Vector3 bh = b.lerp(a, 0.2);
lines.push_back(b);
lines.push_back(bh);
}
diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp
index c28f533958..ed51a2d2cf 100644
--- a/editor/plugins/animation_state_machine_editor.cpp
+++ b/editor/plugins/animation_state_machine_editor.cpp
@@ -885,7 +885,7 @@ void AnimationNodeStateMachineEditor::_state_machine_pos_draw() {
state_machine_play_pos->draw_line(from, to, bg, 2);
- to = from.linear_interpolate(to, c);
+ to = from.lerp(to, c);
state_machine_play_pos->draw_line(from, to, fg, 2);
}
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index 79111762b2..e882b3a8d7 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -1437,13 +1437,13 @@ void CanvasItemEditor::_solve_IK(Node2D *leaf_node, Point2 target_position) {
Vector2 direction = (joints_pos[node_id + 1] - joints_pos[node_id]).normalized();
int len = E->get();
if (E == se->pre_drag_bones_length.front()) {
- joints_pos[1] = joints_pos[1].linear_interpolate(joints_pos[0] + len * direction, solver_k);
+ joints_pos[1] = joints_pos[1].lerp(joints_pos[0] + len * direction, solver_k);
} else if (E == se->pre_drag_bones_length.back()) {
- joints_pos[node_id] = joints_pos[node_id].linear_interpolate(joints_pos[node_id + 1] - len * direction, solver_k);
+ joints_pos[node_id] = joints_pos[node_id].lerp(joints_pos[node_id + 1] - len * direction, solver_k);
} else {
Vector2 center = (joints_pos[node_id + 1] + joints_pos[node_id]) / 2.0;
- joints_pos[node_id] = joints_pos[node_id].linear_interpolate(center - (direction * len) / 2.0, solver_k);
- joints_pos[node_id + 1] = joints_pos[node_id + 1].linear_interpolate(center + (direction * len) / 2.0, solver_k);
+ joints_pos[node_id] = joints_pos[node_id].lerp(center - (direction * len) / 2.0, solver_k);
+ joints_pos[node_id + 1] = joints_pos[node_id + 1].lerp(center + (direction * len) / 2.0, solver_k);
}
node_id++;
}
@@ -2698,7 +2698,7 @@ void CanvasItemEditor::_draw_smart_snapping() {
void CanvasItemEditor::_draw_rulers() {
Color bg_color = get_theme_color("dark_color_2", "Editor");
- Color graduation_color = get_theme_color("font_color", "Editor").linear_interpolate(bg_color, 0.5);
+ Color graduation_color = get_theme_color("font_color", "Editor").lerp(bg_color, 0.5);
Color font_color = get_theme_color("font_color", "Editor");
font_color.a = 0.8;
Ref<Font> font = get_theme_font("rulers", "EditorFonts");
@@ -3072,8 +3072,8 @@ void CanvasItemEditor::_draw_control_helpers(Control *control) {
Vector2 line_ends[4];
for (int i = 0; i < 4; i++) {
float anchor_val = (i >= 2) ? ANCHOR_END - anchors_values[i] : anchors_values[i];
- line_starts[i] = Vector2::linear_interpolate(corners_pos[i], corners_pos[(i + 1) % 4], anchor_val);
- line_ends[i] = Vector2::linear_interpolate(corners_pos[(i + 3) % 4], corners_pos[(i + 2) % 4], anchor_val);
+ line_starts[i] = corners_pos[i].lerp(corners_pos[(i + 1) % 4], anchor_val);
+ line_ends[i] = corners_pos[(i + 3) % 4].lerp(corners_pos[(i + 2) % 4], anchor_val);
anchor_snapped = anchors_values[i] == 0.0 || anchors_values[i] == 0.5 || anchors_values[i] == 1.0;
viewport->draw_line(line_starts[i], line_ends[i], anchor_snapped ? color_snapped : color_base, (i == dragged_anchor || (i + 3) % 4 == dragged_anchor) ? 2 : 1);
}
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index e0b0fe6b53..17eaa06d57 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -268,7 +268,7 @@ void Node3DEditorViewport::_update_camera(float p_interp_delta) {
real_t factor = (1.0 / inertia) * p_interp_delta;
// We interpolate a different point here, because in freelook mode the focus point (cursor.pos) orbits around eye_pos
- camera_cursor.eye_pos = old_camera_cursor.eye_pos.linear_interpolate(cursor.eye_pos, CLAMP(factor, 0, 1));
+ camera_cursor.eye_pos = old_camera_cursor.eye_pos.lerp(cursor.eye_pos, CLAMP(factor, 0, 1));
float orbit_inertia = EDITOR_GET("editors/3d/navigation_feel/orbit_inertia");
orbit_inertia = MAX(0.0001, orbit_inertia);
@@ -318,7 +318,7 @@ void Node3DEditorViewport::_update_camera(float p_interp_delta) {
camera_cursor.y_rot = cursor.y_rot;
}
- camera_cursor.pos = old_camera_cursor.pos.linear_interpolate(cursor.pos, MIN(1.f, p_interp_delta * (1 / translation_inertia)));
+ camera_cursor.pos = old_camera_cursor.pos.lerp(cursor.pos, MIN(1.f, p_interp_delta * (1 / translation_inertia)));
camera_cursor.distance = Math::lerp(old_camera_cursor.distance, cursor.distance, MIN(1.f, p_interp_delta * (1 / zoom_inertia)));
}
}
@@ -4570,10 +4570,10 @@ void Node3DEditor::_generate_selection_box() {
st->add_color(Color(1.0, 1.0, 0.8, 0.8));
st->add_vertex(a);
st->add_color(Color(1.0, 1.0, 0.8, 0.4));
- st->add_vertex(a.linear_interpolate(b, 0.2));
+ st->add_vertex(a.lerp(b, 0.2));
st->add_color(Color(1.0, 1.0, 0.8, 0.4));
- st->add_vertex(a.linear_interpolate(b, 0.8));
+ st->add_vertex(a.lerp(b, 0.8));
st->add_color(Color(1.0, 1.0, 0.8, 0.8));
st->add_vertex(b);
}
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 80d97e7fa9..35a08f2d1c 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -1742,7 +1742,7 @@ void ScriptEditor::_update_script_colors() {
int non_zero_hist_size = (hist_size == 0) ? 1 : hist_size;
float v = Math::ease((edit_pass - pass) / float(non_zero_hist_size), 0.4);
- script_list->set_item_custom_fg_color(i, hot_color.linear_interpolate(cold_color, v));
+ script_list->set_item_custom_fg_color(i, hot_color.lerp(cold_color, v));
}
}
}
diff --git a/editor/rename_dialog.cpp b/editor/rename_dialog.cpp
index 0266ef6a2b..8ae8d0991d 100644
--- a/editor/rename_dialog.cpp
+++ b/editor/rename_dialog.cpp
@@ -403,7 +403,7 @@ void RenameDialog::_update_preview(String new_text) {
// New name is identical to the old one. Don't color it as much to avoid distracting the user.
const Color accent_color = EditorNode::get_singleton()->get_gui_base()->get_theme_color("accent_color", "Editor");
const Color text_color = EditorNode::get_singleton()->get_gui_base()->get_theme_color("default_color", "RichTextLabel");
- lbl_preview->add_theme_color_override("font_color", accent_color.linear_interpolate(text_color, 0.5));
+ lbl_preview->add_theme_color_override("font_color", accent_color.lerp(text_color, 0.5));
} else {
lbl_preview->add_theme_color_override("font_color", EditorNode::get_singleton()->get_gui_base()->get_theme_color("success_color", "Editor"));
}