summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/icons/NavigationPolygonInstance.svg1
-rw-r--r--editor/icons/NavigationRegion2D.svg67
-rw-r--r--editor/plugins/navigation_polygon_editor_plugin.cpp4
-rw-r--r--editor/plugins/navigation_polygon_editor_plugin.h2
-rw-r--r--editor/plugins/tile_set_editor_plugin.cpp4
5 files changed, 72 insertions, 6 deletions
diff --git a/editor/icons/NavigationPolygonInstance.svg b/editor/icons/NavigationPolygonInstance.svg
deleted file mode 100644
index e16d10614e..0000000000
--- a/editor/icons/NavigationPolygonInstance.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#a5b7f3" fill-opacity=".98824" fill-rule="evenodd" transform="translate(0 -1036.4)"><path d="m2 1a1.0001 1.0001 0 0 0 -1 1v12a1.0001 1.0001 0 0 0 1 1h4.9023a2.1002 2.1002 0 0 1 .13086-.73633l.47461-1.2637h-4.5078v-10h8.5859l-4.293 4.293a1.0001 1.0001 0 0 0 0 1.4141l1.3262 1.3262 1.4141-3.7695a2.1002 2.1002 0 0 1 1.9922-1.3613 2.1002 2.1002 0 0 1 .43555.050781l2.2461-2.2461a1.0001 1.0001 0 0 0 -.70703-1.707h-12z" transform="translate(0 1036.4)"/><path d="m15 1051.4-3-8-3 8 3-2z"/></g></svg> \ No newline at end of file
diff --git a/editor/icons/NavigationRegion2D.svg b/editor/icons/NavigationRegion2D.svg
new file mode 100644
index 0000000000..a297216cb7
--- /dev/null
+++ b/editor/icons/NavigationRegion2D.svg
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ inkscape:version="1.0beta2 (unknown)"
+ sodipodi:docname="icon_navigation_polygon_instance.svg"
+ id="svg8"
+ version="1.1"
+ width="16"
+ viewBox="0 0 16 16"
+ height="16">
+ <metadata
+ id="metadata14">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <defs
+ id="defs12" />
+ <sodipodi:namedview
+ inkscape:current-layer="svg8"
+ inkscape:window-maximized="0"
+ inkscape:window-y="18"
+ inkscape:window-x="0"
+ inkscape:cy="10.058435"
+ inkscape:cx="5.8836841"
+ inkscape:zoom="19.64431"
+ showgrid="false"
+ id="namedview10"
+ inkscape:window-height="1041"
+ inkscape:window-width="1916"
+ inkscape:pageshadow="2"
+ inkscape:pageopacity="0"
+ guidetolerance="10"
+ gridtolerance="10"
+ objecttolerance="10"
+ borderopacity="1"
+ inkscape:document-rotation="0"
+ bordercolor="#666666"
+ pagecolor="#ffffff" />
+ <g
+ id="g6"
+ transform="translate(0 -1036.4)"
+ fill-rule="evenodd"
+ fill-opacity=".98824"
+ fill="#a5b7f3">
+ <path
+ sodipodi:nodetypes="cccccccccccccc"
+ inkscape:connector-curvature="0"
+ id="path2"
+ transform="translate(0,1036.4)"
+ d="M 2,1 C 1.4477381,1.0000552 1.0000552,1.4477381 1,2 v 12 c 5.52e-5,0.552262 0.4477381,0.999945 1,1 h 4.9023 c -7.836e-4,-0.251296 0.043539,-0.500692 0.13086,-0.73633 l 0.47461,-1.2637 2.5254,-6.7362 c 0.311135,-0.8280197 1.107723,-1.3723398 1.9922,-1.3613 0.146558,0.00168 0.292536,0.018702 0.43555,0.050781 l 2.2461,-2.2461 c 0.629502,-0.6299963 0.18357,-1.7066217 -0.70703,-1.707 h -12 z" />
+ <path
+ id="path4"
+ d="m15 1051.4-3-8-3 8 3-2z" />
+ </g>
+</svg>
diff --git a/editor/plugins/navigation_polygon_editor_plugin.cpp b/editor/plugins/navigation_polygon_editor_plugin.cpp
index c4e61f2488..6671d0b6b4 100644
--- a/editor/plugins/navigation_polygon_editor_plugin.cpp
+++ b/editor/plugins/navigation_polygon_editor_plugin.cpp
@@ -48,7 +48,7 @@ Node2D *NavigationPolygonEditor::_get_node() const {
void NavigationPolygonEditor::_set_node(Node *p_polygon) {
- node = Object::cast_to<NavigationPolygonInstance>(p_polygon);
+ node = Object::cast_to<NavigationRegion2D>(p_polygon);
}
int NavigationPolygonEditor::_get_polygon_count() const {
@@ -127,5 +127,5 @@ NavigationPolygonEditor::NavigationPolygonEditor(EditorNode *p_editor) :
}
NavigationPolygonEditorPlugin::NavigationPolygonEditorPlugin(EditorNode *p_node) :
- AbstractPolygon2DEditorPlugin(p_node, memnew(NavigationPolygonEditor(p_node)), "NavigationPolygonInstance") {
+ AbstractPolygon2DEditorPlugin(p_node, memnew(NavigationPolygonEditor(p_node)), "NavigationRegion2D") {
}
diff --git a/editor/plugins/navigation_polygon_editor_plugin.h b/editor/plugins/navigation_polygon_editor_plugin.h
index 1cab336381..10f8cbc0a5 100644
--- a/editor/plugins/navigation_polygon_editor_plugin.h
+++ b/editor/plugins/navigation_polygon_editor_plugin.h
@@ -38,7 +38,7 @@ class NavigationPolygonEditor : public AbstractPolygon2DEditor {
GDCLASS(NavigationPolygonEditor, AbstractPolygon2DEditor);
- NavigationPolygonInstance *node;
+ NavigationRegion2D *node;
Ref<NavigationPolygon> _ensure_navpoly() const;
diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp
index a61b291029..0d5741d84a 100644
--- a/editor/plugins/tile_set_editor_plugin.cpp
+++ b/editor/plugins/tile_set_editor_plugin.cpp
@@ -109,8 +109,8 @@ void TileSetEditor::_import_node(Node *p_node, Ref<TileSet> p_library) {
Node *child2 = mi->get_child(j);
- if (Object::cast_to<NavigationPolygonInstance>(child2))
- nav_poly = Object::cast_to<NavigationPolygonInstance>(child2)->get_navigation_polygon();
+ if (Object::cast_to<NavigationRegion2D>(child2))
+ nav_poly = Object::cast_to<NavigationRegion2D>(child2)->get_navigation_polygon();
if (Object::cast_to<LightOccluder2D>(child2))
occluder = Object::cast_to<LightOccluder2D>(child2)->get_occluder_polygon();