1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-17 14:11:06 +00:00

Use Array for node configuration warnings

Previously, the warnings were passed as a string and delimitation of which were hard coded at each implementation.
This commit is contained in:
Nathan Franke
2020-10-29 05:01:28 -05:00
parent 4a1f2dcb74
commit 2a8c59c171
96 changed files with 426 additions and 674 deletions

View File

@@ -232,7 +232,7 @@ void ShaderGlobalsOverride::_activate() {
}
}
update_configuration_warning(); //may have activated
update_configuration_warnings(); //may have activated
}
}
@@ -260,17 +260,14 @@ void ShaderGlobalsOverride::_notification(int p_what) {
}
}
String ShaderGlobalsOverride::get_configuration_warning() const {
String warning = Node::get_configuration_warning();
TypedArray<String> ShaderGlobalsOverride::get_configuration_warnings() const {
TypedArray<String> warnings = Node::get_configuration_warnings();
if (!active) {
if (!warning.is_empty()) {
warning += "\n\n";
}
warning += TTR("ShaderGlobalsOverride is not active because another node of the same type is in the scene.");
warnings.push_back(TTR("ShaderGlobalsOverride is not active because another node of the same type is in the scene."));
}
return warning;
return warnings;
}
void ShaderGlobalsOverride::_bind_methods() {