summaryrefslogtreecommitdiff
path: root/scene/2d/remote_transform_2d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/2d/remote_transform_2d.cpp')
-rw-r--r--scene/2d/remote_transform_2d.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/scene/2d/remote_transform_2d.cpp b/scene/2d/remote_transform_2d.cpp
index f10714e28a..fe3e867424 100644
--- a/scene/2d/remote_transform_2d.cpp
+++ b/scene/2d/remote_transform_2d.cpp
@@ -29,13 +29,12 @@
/*************************************************************************/
#include "remote_transform_2d.h"
-#include "scene/scene_string_names.h"
void RemoteTransform2D::_update_cache() {
cache = ObjectID();
if (has_node(remote_node)) {
Node *node = get_node(remote_node);
- if (!node || this == node || node->is_a_parent_of(this) || this->is_a_parent_of(node)) {
+ if (!node || this == node || node->is_ancestor_of(this) || this->is_ancestor_of(node)) {
return;
}
@@ -138,7 +137,7 @@ void RemoteTransform2D::set_remote_node(const NodePath &p_remote_node) {
_update_remote();
}
- update_configuration_warning();
+ update_configuration_warnings();
}
NodePath RemoteTransform2D::get_remote_node() const {
@@ -185,17 +184,14 @@ void RemoteTransform2D::force_update_cache() {
_update_cache();
}
-String RemoteTransform2D::get_configuration_warning() const {
- String warning = Node2D::get_configuration_warning();
+TypedArray<String> RemoteTransform2D::get_configuration_warnings() const {
+ TypedArray<String> warnings = Node::get_configuration_warnings();
if (!has_node(remote_node) || !Object::cast_to<Node2D>(get_node(remote_node))) {
- if (!warning.is_empty()) {
- warning += "\n\n";
- }
- warning += TTR("Path property must point to a valid Node2D node to work.");
+ warnings.push_back(TTR("Path property must point to a valid Node2D node to work."));
}
- return warning;
+ return warnings;
}
void RemoteTransform2D::_bind_methods() {