mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03: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:
@@ -373,7 +373,7 @@ void PointLight2D::set_texture(const Ref<Texture2D> &p_texture) {
|
||||
RS::get_singleton()->canvas_light_set_texture(_get_light(), RID());
|
||||
}
|
||||
|
||||
update_configuration_warning();
|
||||
update_configuration_warnings();
|
||||
}
|
||||
|
||||
Ref<Texture2D> PointLight2D::get_texture() const {
|
||||
@@ -390,17 +390,14 @@ Vector2 PointLight2D::get_texture_offset() const {
|
||||
return texture_offset;
|
||||
}
|
||||
|
||||
String PointLight2D::get_configuration_warning() const {
|
||||
String warning = Node2D::get_configuration_warning();
|
||||
TypedArray<String> PointLight2D::get_configuration_warnings() const {
|
||||
TypedArray<String> warnings = Node::get_configuration_warnings();
|
||||
|
||||
if (!texture.is_valid()) {
|
||||
if (!warning.is_empty()) {
|
||||
warning += "\n\n";
|
||||
}
|
||||
warning += TTR("A texture with the shape of the light must be supplied to the \"Texture\" property.");
|
||||
warnings.push_back(TTR("A texture with the shape of the light must be supplied to the \"Texture\" property."));
|
||||
}
|
||||
|
||||
return warning;
|
||||
return warnings;
|
||||
}
|
||||
|
||||
void PointLight2D::set_texture_scale(real_t p_scale) {
|
||||
|
||||
Reference in New Issue
Block a user