mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +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:
parent
4a1f2dcb74
commit
2a8c59c171
96 changed files with 426 additions and 674 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue