diff options
Diffstat (limited to 'scene/2d/light_occluder_2d.cpp')
-rw-r--r-- | scene/2d/light_occluder_2d.cpp | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/scene/2d/light_occluder_2d.cpp b/scene/2d/light_occluder_2d.cpp index 3146e64c08..fdc28f81c2 100644 --- a/scene/2d/light_occluder_2d.cpp +++ b/scene/2d/light_occluder_2d.cpp @@ -145,9 +145,6 @@ void OccluderPolygon2D::_bind_methods() { OccluderPolygon2D::OccluderPolygon2D() { occ_polygon = RS::get_singleton()->canvas_occluder_polygon_create(); - closed = true; - cull = CULL_DISABLED; - rect_cache_dirty = true; } OccluderPolygon2D::~OccluderPolygon2D() { @@ -245,24 +242,18 @@ int LightOccluder2D::get_occluder_light_mask() const { return mask; } -String LightOccluder2D::get_configuration_warning() const { - String warning = Node2D::get_configuration_warning(); +TypedArray<String> LightOccluder2D::get_configuration_warnings() const { + TypedArray<String> warnings = Node::get_configuration_warnings(); if (!occluder_polygon.is_valid()) { - if (!warning.is_empty()) { - warning += "\n\n"; - } - warning += TTR("An occluder polygon must be set (or drawn) for this occluder to take effect."); + warnings.push_back(TTR("An occluder polygon must be set (or drawn) for this occluder to take effect.")); } if (occluder_polygon.is_valid() && occluder_polygon->get_polygon().size() == 0) { - if (!warning.is_empty()) { - warning += "\n\n"; - } - warning += TTR("The occluder polygon for this occluder is empty. Please draw a polygon."); + warnings.push_back(TTR("The occluder polygon for this occluder is empty. Please draw a polygon.")); } - return warning; + return warnings; } void LightOccluder2D::set_as_sdf_collision(bool p_enable) { |