summaryrefslogtreecommitdiff
path: root/scene/2d/parallax_layer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/2d/parallax_layer.cpp')
-rw-r--r--scene/2d/parallax_layer.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/scene/2d/parallax_layer.cpp b/scene/2d/parallax_layer.cpp
index 7a898e43c9..bf559deb09 100644
--- a/scene/2d/parallax_layer.cpp
+++ b/scene/2d/parallax_layer.cpp
@@ -118,6 +118,16 @@ void ParallaxLayer::set_base_offset_and_scale(const Point2& p_offset,float p_sca
}
+
+String ParallaxLayer::get_configuration_warning() const {
+
+ if (!get_parent() || !get_parent()->cast_to<ParallaxBackground>()) {
+ return TTR("ParallaxLayer node only works when set as child of a ParallaxBackground node.");
+ }
+
+ return String();
+}
+
void ParallaxLayer::_bind_methods() {
ObjectTypeDB::bind_method(_MD("set_motion_scale","scale"),&ParallaxLayer::set_motion_scale);