From 2b19c70664dafd3e5689fc612feb7f7ac17c1a0a Mon Sep 17 00:00:00 2001 From: smix8 <52464204+smix8@users.noreply.github.com> Date: Mon, 13 Feb 2023 04:35:42 +0100 Subject: Fix 2D navigation debug visuals ignoring half the ProjectSettings Fixes that NavigationRegion2D and TileMap debug visuals ignored more or less half the ProjectSetting. E.g. random color could not be disabled, edges did not display. --- servers/navigation_server_2d.cpp | 32 ++++++++++++++++++++++++++++++++ servers/navigation_server_2d.h | 12 ++++++++++++ 2 files changed, 44 insertions(+) (limited to 'servers') diff --git a/servers/navigation_server_2d.cpp b/servers/navigation_server_2d.cpp index 85ba8ed431..668b1dffc3 100644 --- a/servers/navigation_server_2d.cpp +++ b/servers/navigation_server_2d.cpp @@ -200,6 +200,22 @@ Color NavigationServer2D::get_debug_navigation_link_connection_disabled_color() return NavigationServer3D::get_singleton()->get_debug_navigation_link_connection_disabled_color(); } +void NavigationServer2D::set_debug_navigation_geometry_edge_color(const Color &p_color) { + NavigationServer3D::get_singleton()->set_debug_navigation_geometry_edge_color(p_color); +} + +Color NavigationServer2D::get_debug_navigation_geometry_edge_color() const { + return NavigationServer3D::get_singleton()->get_debug_navigation_geometry_edge_color(); +} + +void NavigationServer2D::set_debug_navigation_geometry_edge_disabled_color(const Color &p_color) { + NavigationServer3D::get_singleton()->set_debug_navigation_geometry_edge_disabled_color(p_color); +} + +Color NavigationServer2D::get_debug_navigation_geometry_edge_disabled_color() const { + return NavigationServer3D::get_singleton()->get_debug_navigation_geometry_edge_disabled_color(); +} + void NavigationServer2D::set_debug_navigation_enable_edge_connections(const bool p_value) { NavigationServer3D::get_singleton()->set_debug_navigation_enable_edge_connections(p_value); } @@ -208,6 +224,22 @@ bool NavigationServer2D::get_debug_navigation_enable_edge_connections() const { return NavigationServer3D::get_singleton()->get_debug_navigation_enable_edge_connections(); } +void NavigationServer2D::set_debug_navigation_enable_geometry_face_random_color(const bool p_value) { + NavigationServer3D::get_singleton()->set_debug_navigation_enable_geometry_face_random_color(p_value); +} + +bool NavigationServer2D::get_debug_navigation_enable_geometry_face_random_color() const { + return NavigationServer3D::get_singleton()->get_debug_navigation_enable_geometry_face_random_color(); +} + +void NavigationServer2D::set_debug_navigation_enable_edge_lines(const bool p_value) { + NavigationServer3D::get_singleton()->set_debug_navigation_enable_edge_lines(p_value); +} + +bool NavigationServer2D::get_debug_navigation_enable_edge_lines() const { + return NavigationServer3D::get_singleton()->get_debug_navigation_enable_edge_lines(); +} + void NavigationServer2D::set_debug_navigation_agent_path_color(const Color &p_color) { NavigationServer3D::get_singleton()->set_debug_navigation_agent_path_color(p_color); } diff --git a/servers/navigation_server_2d.h b/servers/navigation_server_2d.h index 9bbcb9ec87..153e60272c 100644 --- a/servers/navigation_server_2d.h +++ b/servers/navigation_server_2d.h @@ -247,6 +247,12 @@ public: void set_debug_navigation_geometry_face_disabled_color(const Color &p_color); Color get_debug_navigation_geometry_face_disabled_color() const; + void set_debug_navigation_geometry_edge_color(const Color &p_color); + Color get_debug_navigation_geometry_edge_color() const; + + void set_debug_navigation_geometry_edge_disabled_color(const Color &p_color); + Color get_debug_navigation_geometry_edge_disabled_color() const; + void set_debug_navigation_link_connection_color(const Color &p_color); Color get_debug_navigation_link_connection_color() const; @@ -256,6 +262,12 @@ public: void set_debug_navigation_enable_edge_connections(const bool p_value); bool get_debug_navigation_enable_edge_connections() const; + void set_debug_navigation_enable_geometry_face_random_color(const bool p_value); + bool get_debug_navigation_enable_geometry_face_random_color() const; + + void set_debug_navigation_enable_edge_lines(const bool p_value); + bool get_debug_navigation_enable_edge_lines() const; + void set_debug_navigation_agent_path_color(const Color &p_color); Color get_debug_navigation_agent_path_color() const; -- cgit v1.2.3