diff options
| author | Juan Linietsky <reduzio@gmail.com> | 2015-09-24 18:07:13 -0300 |
|---|---|---|
| committer | Juan Linietsky <reduzio@gmail.com> | 2015-09-24 18:07:13 -0300 |
| commit | 9962518ffdcbd6936e3565311152799d7a71c9c3 (patch) | |
| tree | c2706fc63d28b588daebb94a940d94f32b402b65 /scene/2d/navigation_polygon.cpp | |
| parent | 82a3304458738b410a5aff8994ce587413aeb464 (diff) | |
| parent | f6957eb1542fd0fd476140b1abec1f09a250fce4 (diff) | |
Merge branch 'master' of https://github.com/okamstudio/godot
Diffstat (limited to 'scene/2d/navigation_polygon.cpp')
| -rw-r--r-- | scene/2d/navigation_polygon.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scene/2d/navigation_polygon.cpp b/scene/2d/navigation_polygon.cpp index fc69ea8a0d..792f079ab0 100644 --- a/scene/2d/navigation_polygon.cpp +++ b/scene/2d/navigation_polygon.cpp @@ -279,7 +279,7 @@ void NavigationPolygonInstance::set_enabled(bool p_enabled) { } - if (get_tree()->is_editor_hint()) + if (get_tree()->is_editor_hint() || get_tree()->is_debugging_navigation_hint()) update(); // update_gizmo(); @@ -338,7 +338,7 @@ void NavigationPolygonInstance::_notification(int p_what) { } break; case NOTIFICATION_DRAW: { - if (is_inside_tree() && get_tree()->is_editor_hint() && navpoly.is_valid()) { + if (is_inside_tree() && (get_tree()->is_editor_hint() || get_tree()->is_debugging_navigation_hint()) && navpoly.is_valid()) { DVector<Vector2> verts=navpoly->get_vertices(); int vsize = verts.size(); @@ -348,9 +348,9 @@ void NavigationPolygonInstance::_notification(int p_what) { Color color; if (enabled) { - color=Color(0.1,0.8,1.0,0.4); + color=get_tree()->get_debug_navigation_color(); } else { - color=Color(1.0,0.8,0.1,0.4); + color=get_tree()->get_debug_navigation_disabled_color(); } Vector<Color> colors; Vector<Vector2> vertices; @@ -423,7 +423,7 @@ Ref<NavigationPolygon> NavigationPolygonInstance::get_navigation_polygon() const void NavigationPolygonInstance::_navpoly_changed() { - if (is_inside_tree() && get_tree()->is_editor_hint()) + if (is_inside_tree() && (get_tree()->is_editor_hint() || get_tree()->is_debugging_navigation_hint())) update(); } |