Merge pull request #38743 from arrowinaknee/node-config-warnings
Update all get_configuration_warning() to retrieve warnings from the parent
This commit is contained in:
commit
12091b39d2
40 changed files with 284 additions and 114 deletions
|
|
@ -246,15 +246,23 @@ int LightOccluder2D::get_occluder_light_mask() const {
|
|||
}
|
||||
|
||||
String LightOccluder2D::get_configuration_warning() const {
|
||||
String warning = Node2D::get_configuration_warning();
|
||||
|
||||
if (!occluder_polygon.is_valid()) {
|
||||
return TTR("An occluder polygon must be set (or drawn) for this occluder to take effect.");
|
||||
if (!warning.empty()) {
|
||||
warning += "\n\n";
|
||||
}
|
||||
warning += 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) {
|
||||
return TTR("The occluder polygon for this occluder is empty. Please draw a polygon.");
|
||||
if (!warning.empty()) {
|
||||
warning += "\n\n";
|
||||
}
|
||||
warning += TTR("The occluder polygon for this occluder is empty. Please draw a polygon.");
|
||||
}
|
||||
|
||||
return String();
|
||||
return warning;
|
||||
}
|
||||
|
||||
void LightOccluder2D::_bind_methods() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue