summaryrefslogtreecommitdiffstats
path: root/modules/gridmap
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gridmap')
-rw-r--r--modules/gridmap/doc_classes/GridMap.xml2
-rw-r--r--modules/gridmap/editor/grid_map_editor_plugin.cpp17
-rw-r--r--modules/gridmap/grid_map.cpp6
3 files changed, 11 insertions, 14 deletions
diff --git a/modules/gridmap/doc_classes/GridMap.xml b/modules/gridmap/doc_classes/GridMap.xml
index ef7276f493..cf13068efa 100644
--- a/modules/gridmap/doc_classes/GridMap.xml
+++ b/modules/gridmap/doc_classes/GridMap.xml
@@ -135,7 +135,7 @@
<return type="Vector3" />
<param index="0" name="map_position" type="Vector3i" />
<description>
- Returns the position of a grid cell in the GridMap's local coordinate space. To convert the returned value into global coordinates, use [method Node3D.to_global]. See also [method map_to_local].
+ Returns the position of a grid cell in the GridMap's local coordinate space. To convert the returned value into global coordinates, use [method Node3D.to_global]. See also [method local_to_map].
</description>
</method>
<method name="resource_changed" deprecated="Use [signal Resource.changed] instead.">
diff --git a/modules/gridmap/editor/grid_map_editor_plugin.cpp b/modules/gridmap/editor/grid_map_editor_plugin.cpp
index d53bf7f7ec..27c74421db 100644
--- a/modules/gridmap/editor/grid_map_editor_plugin.cpp
+++ b/modules/gridmap/editor/grid_map_editor_plugin.cpp
@@ -32,7 +32,6 @@
#ifdef TOOLS_ENABLED
-#include "core/core_string_names.h"
#include "core/input/input.h"
#include "core/os/keyboard.h"
#include "editor/editor_node.h"
@@ -949,7 +948,7 @@ void GridMapEditor::_update_mesh_library() {
void GridMapEditor::edit(GridMap *p_gridmap) {
if (node) {
node->disconnect(SNAME("cell_size_changed"), callable_mp(this, &GridMapEditor::_draw_grids));
- node->disconnect(CoreStringNames::get_singleton()->changed, callable_mp(this, &GridMapEditor::_update_mesh_library));
+ node->disconnect(CoreStringName(changed), callable_mp(this, &GridMapEditor::_update_mesh_library));
if (mesh_library.is_valid()) {
mesh_library->disconnect_changed(callable_mp(this, &GridMapEditor::update_palette));
mesh_library = Ref<MeshLibrary>();
@@ -987,7 +986,7 @@ void GridMapEditor::edit(GridMap *p_gridmap) {
update_grid();
node->connect(SNAME("cell_size_changed"), callable_mp(this, &GridMapEditor::_draw_grids));
- node->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &GridMapEditor::_update_mesh_library));
+ node->connect(CoreStringName(changed), callable_mp(this, &GridMapEditor::_update_mesh_library));
_update_mesh_library();
}
@@ -1225,8 +1224,8 @@ GridMapEditor::GridMapEditor() {
spatial_editor_hb->add_child(floor);
floor->connect("value_changed", callable_mp(this, &GridMapEditor::_floor_changed));
- floor->connect("mouse_exited", callable_mp(this, &GridMapEditor::_floor_mouse_exited));
- floor->get_line_edit()->connect("mouse_exited", callable_mp(this, &GridMapEditor::_floor_mouse_exited));
+ floor->connect(SceneStringName(mouse_exited), callable_mp(this, &GridMapEditor::_floor_mouse_exited));
+ floor->get_line_edit()->connect(SceneStringName(mouse_exited), callable_mp(this, &GridMapEditor::_floor_mouse_exited));
spatial_editor_hb->add_child(memnew(VSeparator));
@@ -1288,21 +1287,21 @@ GridMapEditor::GridMapEditor() {
search_box->set_clear_button_enabled(true);
hb->add_child(search_box);
search_box->connect("text_changed", callable_mp(this, &GridMapEditor::_text_changed));
- search_box->connect("gui_input", callable_mp(this, &GridMapEditor::_sbox_input));
+ search_box->connect(SceneStringName(gui_input), callable_mp(this, &GridMapEditor::_sbox_input));
mode_thumbnail = memnew(Button);
mode_thumbnail->set_theme_type_variation("FlatButton");
mode_thumbnail->set_toggle_mode(true);
mode_thumbnail->set_pressed(true);
hb->add_child(mode_thumbnail);
- mode_thumbnail->connect("pressed", callable_mp(this, &GridMapEditor::_set_display_mode).bind(DISPLAY_THUMBNAIL));
+ mode_thumbnail->connect(SceneStringName(pressed), callable_mp(this, &GridMapEditor::_set_display_mode).bind(DISPLAY_THUMBNAIL));
mode_list = memnew(Button);
mode_list->set_theme_type_variation("FlatButton");
mode_list->set_toggle_mode(true);
mode_list->set_pressed(false);
hb->add_child(mode_list);
- mode_list->connect("pressed", callable_mp(this, &GridMapEditor::_set_display_mode).bind(DISPLAY_LIST));
+ mode_list->connect(SceneStringName(pressed), callable_mp(this, &GridMapEditor::_set_display_mode).bind(DISPLAY_LIST));
size_slider = memnew(HSlider);
size_slider->set_h_size_flags(SIZE_EXPAND_FILL);
@@ -1319,7 +1318,7 @@ GridMapEditor::GridMapEditor() {
mesh_library_palette->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
add_child(mesh_library_palette);
mesh_library_palette->set_v_size_flags(SIZE_EXPAND_FILL);
- mesh_library_palette->connect("gui_input", callable_mp(this, &GridMapEditor::_mesh_library_palette_input));
+ mesh_library_palette->connect(SceneStringName(gui_input), callable_mp(this, &GridMapEditor::_mesh_library_palette_input));
info_message = memnew(Label);
info_message->set_text(TTR("Give a MeshLibrary resource to this GridMap to use its meshes."));
diff --git a/modules/gridmap/grid_map.cpp b/modules/gridmap/grid_map.cpp
index 25519c6e3c..71171be3f1 100644
--- a/modules/gridmap/grid_map.cpp
+++ b/modules/gridmap/grid_map.cpp
@@ -30,14 +30,12 @@
#include "grid_map.h"
-#include "core/core_string_names.h"
#include "core/io/marshalls.h"
#include "scene/3d/light_3d.h"
#include "scene/resources/3d/mesh_library.h"
#include "scene/resources/3d/primitive_meshes.h"
#include "scene/resources/physics_material.h"
#include "scene/resources/surface_tool.h"
-#include "scene/scene_string_names.h"
#include "servers/navigation_server_3d.h"
#include "servers/rendering_server.h"
@@ -266,7 +264,7 @@ void GridMap::set_mesh_library(const Ref<MeshLibrary> &p_mesh_library) {
}
_recreate_octant_data();
- emit_signal(CoreStringNames::get_singleton()->changed);
+ emit_signal(CoreStringName(changed));
}
Ref<MeshLibrary> GridMap::get_mesh_library() const {
@@ -1136,7 +1134,7 @@ void GridMap::_bind_methods() {
BIND_CONSTANT(INVALID_CELL_ITEM);
ADD_SIGNAL(MethodInfo("cell_size_changed", PropertyInfo(Variant::VECTOR3, "cell_size")));
- ADD_SIGNAL(MethodInfo(CoreStringNames::get_singleton()->changed));
+ ADD_SIGNAL(MethodInfo(CoreStringName(changed)));
}
void GridMap::set_cell_scale(float p_scale) {