summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrii Doroshenko (Xrayez) <xrayez@gmail.com>2020-02-09 00:04:31 +0200
committerAndrii Doroshenko (Xrayez) <xrayez@gmail.com>2020-02-09 00:11:43 +0200
commitaaf9b7c5bbb69180b8ae2c4d9068923834bbad98 (patch)
tree77c3113ea7ab0c79353e230a6f407217e88b619e
parent42f04cbc1a59772a5f7eca9c6847fa349b23a70e (diff)
Do not override Path2D.self_modulate property
Self-modulation was forcefully used for the curve drawing which can interfere with scripted drawing. The curve color is specified by the `draw_line()` method instead.
-rw-r--r--scene/2d/path_2d.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/scene/2d/path_2d.cpp b/scene/2d/path_2d.cpp
index ef7c343c1a..3525285050 100644
--- a/scene/2d/path_2d.cpp
+++ b/scene/2d/path_2d.cpp
@@ -102,7 +102,7 @@ void Path2D::_notification(int p_what) {
#else
const float line_width = 2;
#endif
- const Color color = Color(1.0, 1.0, 1.0, 1.0);
+ const Color color = Color(0.5, 0.6, 1.0, 0.7);
for (int i = 0; i < curve->get_point_count(); i++) {
@@ -163,7 +163,6 @@ void Path2D::_bind_methods() {
Path2D::Path2D() {
set_curve(Ref<Curve2D>(memnew(Curve2D))); //create one by default
- set_self_modulate(Color(0.5, 0.6, 1.0, 0.7));
}
/////////////////////////////////////////////////////////////////////////////////