diff options
| author | Juan Linietsky | 2016-05-17 18:27:15 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2016-05-17 18:28:44 -0300 |
| commit | c195c0df6b36debc870216dd42e49fbda70fa861 (patch) | |
| tree | 194a26e39ace86d7a471f3e86159c2aed6be261c /scene/2d/parallax_layer.cpp | |
| parent | 3a26e14a2bab777c9ba6aedceff6e4ef2666faf0 (diff) | |
| download | godot-c195c0df6b36debc870216dd42e49fbda70fa861.tar.gz godot-c195c0df6b36debc870216dd42e49fbda70fa861.tar.zst godot-c195c0df6b36debc870216dd42e49fbda70fa861.zip | |
Diffstat (limited to 'scene/2d/parallax_layer.cpp')
| -rw-r--r-- | scene/2d/parallax_layer.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/scene/2d/parallax_layer.cpp b/scene/2d/parallax_layer.cpp index 7a898e43c..bf559deb0 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); |
