1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-17 14:11:06 +00:00

Update all get_configuration_warning to retrieve warnings from the parent

This commit is contained in:
ArrowInAKnee
2020-05-14 23:59:27 +03:00
parent 00949f0c5f
commit 9fc2b0fddc
40 changed files with 284 additions and 114 deletions

View File

@@ -78,14 +78,19 @@ String CanvasModulate::get_configuration_warning() const {
return String();
}
String warning = Node2D::get_configuration_warning();
List<Node *> nodes;
get_tree()->get_nodes_in_group("_canvas_modulate_" + itos(get_canvas().get_id()), &nodes);
if (nodes.size() > 1) {
return TTR("Only one visible CanvasModulate is allowed per scene (or set of instanced scenes). The first created one will work, while the rest will be ignored.");
if (!warning.empty()) {
warning += "\n\n";
}
warning += TTR("Only one visible CanvasModulate is allowed per scene (or set of instanced scenes). The first created one will work, while the rest will be ignored.");
}
return String();
return warning;
}
CanvasModulate::CanvasModulate() {