You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Update all get_configuration_warning to retrieve warnings from the parent
This commit is contained in:
@@ -136,11 +136,16 @@ void ParallaxLayer::set_base_offset_and_scale(const Point2 &p_offset, float p_sc
|
||||
}
|
||||
|
||||
String ParallaxLayer::get_configuration_warning() const {
|
||||
String warning = Node2D::get_configuration_warning();
|
||||
|
||||
if (!Object::cast_to<ParallaxBackground>(get_parent())) {
|
||||
return TTR("ParallaxLayer node only works when set as child of a ParallaxBackground node.");
|
||||
if (!warning.empty()) {
|
||||
warning += "\n\n";
|
||||
}
|
||||
warning += TTR("ParallaxLayer node only works when set as child of a ParallaxBackground node.");
|
||||
}
|
||||
|
||||
return String();
|
||||
return warning;
|
||||
}
|
||||
|
||||
void ParallaxLayer::_bind_methods() {
|
||||
|
||||
Reference in New Issue
Block a user