diff options
| author | volzhs | 2018-04-17 15:06:15 +0900 |
|---|---|---|
| committer | Hein-Pieter van Braam | 2018-05-13 22:43:10 +0200 |
| commit | 0b3b3de2cd8a53dc1e5c2c3d7b67407a02ca6ed4 (patch) | |
| tree | 5161d7b0ca07d64f748e1c9186dabc5ebd0ad91a /scene/2d/path_2d.cpp | |
| parent | 5e551a584e3f26ad41cad43aed22bca725e13ff7 (diff) | |
| download | godot-0b3b3de2cd8a53dc1e5c2c3d7b67407a02ca6ed4.tar.gz godot-0b3b3de2cd8a53dc1e5c2c3d7b67407a02ca6ed4.tar.zst godot-0b3b3de2cd8a53dc1e5c2c3d7b67407a02ca6ed4.zip | |
Ability to change path color with self modulate
Fix #18164
(cherry picked from commit d77ffa3e97932b17e6b3da5b776b0d0760f3ce6e)
Diffstat (limited to '')
| -rw-r--r-- | scene/2d/path_2d.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/2d/path_2d.cpp b/scene/2d/path_2d.cpp index 052a0ac02..cbdf81b80 100644 --- a/scene/2d/path_2d.cpp +++ b/scene/2d/path_2d.cpp @@ -92,7 +92,7 @@ void Path2D::_notification(int p_what) { #else const float line_width = 2; #endif - const Color color = Color(0.5, 0.6, 1.0, 0.7); + const Color color = Color(1.0, 1.0, 1.0, 1.0); for (int i = 0; i < curve->get_point_count(); i++) { @@ -147,6 +147,7 @@ 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)); } ///////////////////////////////////////////////////////////////////////////////// |
