summaryrefslogtreecommitdiff
path: root/scene/2d/remote_transform_2d.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-04-12 09:40:55 +0200
committerGitHub <noreply@github.com>2021-04-12 09:40:55 +0200
commitcee5414698b14be3ce837b4c9de3a3d500d28611 (patch)
treec6ef3961655e03dc601ac826f28206844876e1cb /scene/2d/remote_transform_2d.cpp
parent184abce1928e694bc884537cf0d5ef42333ba10d (diff)
parent2a8c59c171e609d739dcc59d15e3e205dbf47cde (diff)
Merge pull request #43180 from nathanfranke/node-configuration-array
Use Array for node configuration warnings
Diffstat (limited to 'scene/2d/remote_transform_2d.cpp')
-rw-r--r--scene/2d/remote_transform_2d.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/scene/2d/remote_transform_2d.cpp b/scene/2d/remote_transform_2d.cpp
index f10714e28a..a7613dc009 100644
--- a/scene/2d/remote_transform_2d.cpp
+++ b/scene/2d/remote_transform_2d.cpp
@@ -138,7 +138,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 +185,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() {