summaryrefslogtreecommitdiff
path: root/scene/2d
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2018-08-21 17:47:31 +0200
committerRémi Verschelde <rverschelde@gmail.com>2018-08-21 17:48:31 +0200
commit2969dffbe3dc8cc5fc45f284a935f177f79efab4 (patch)
tree642952237ce1a03ff0aa49fc89b02fa43df3f6e0 /scene/2d
parent238b70e2db7e376ce8b627bbba5770535270da30 (diff)
Deprecate incorrect Color::gray()
This average is not a proper approximation of a grayscale value, get_v() is better suited for that. If we want a real to_grayscale() conversion, it's somewhat more involved: https://en.wikipedia.org/wiki/Grayscale Remove the deprecated Gray() from C# bindings as it conflicts with new named color constants.
Diffstat (limited to 'scene/2d')
-rw-r--r--scene/2d/collision_shape_2d.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/2d/collision_shape_2d.cpp b/scene/2d/collision_shape_2d.cpp
index 83ef4df8f4..ff5f7062c4 100644
--- a/scene/2d/collision_shape_2d.cpp
+++ b/scene/2d/collision_shape_2d.cpp
@@ -119,7 +119,7 @@ void CollisionShape2D::_notification(int p_what) {
Color draw_col = get_tree()->get_debug_collisions_color();
if (disabled) {
- float g = draw_col.gray();
+ float g = draw_col.get_v();
draw_col.r = g;
draw_col.g = g;
draw_col.b = g;