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
|
|
@ -928,7 +928,7 @@ void AnimatedSprite3D::set_sprite_frames(const Ref<SpriteFrames> &p_frames) {
|
|||
notify_property_list_changed();
|
||||
_reset_timeout();
|
||||
_queue_update();
|
||||
update_configuration_warning();
|
||||
update_configuration_warnings();
|
||||
}
|
||||
|
||||
Ref<SpriteFrames> AnimatedSprite3D::get_sprite_frames() const {
|
||||
|
|
@ -1058,17 +1058,14 @@ StringName AnimatedSprite3D::get_animation() const {
|
|||
return animation;
|
||||
}
|
||||
|
||||
String AnimatedSprite3D::get_configuration_warning() const {
|
||||
String warning = SpriteBase3D::get_configuration_warning();
|
||||
TypedArray<String> AnimatedSprite3D::get_configuration_warnings() const {
|
||||
TypedArray<String> warnings = Node::get_configuration_warnings();
|
||||
|
||||
if (frames.is_null()) {
|
||||
if (!warning.is_empty()) {
|
||||
warning += "\n\n";
|
||||
}
|
||||
warning += TTR("A SpriteFrames resource must be created or set in the \"Frames\" property in order for AnimatedSprite3D to display frames.");
|
||||
warnings.push_back(TTR("A SpriteFrames resource must be created or set in the \"Frames\" property in order for AnimatedSprite3D to display frames."));
|
||||
}
|
||||
|
||||
return warning;
|
||||
return warnings;
|
||||
}
|
||||
|
||||
void AnimatedSprite3D::_bind_methods() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue