You've already forked godot
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:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user