summaryrefslogtreecommitdiffstats
path: root/scene/2d/parallax_layer.h
diff options
context:
space:
mode:
authorSofox <sofoxx@gmail.com>2017-10-26 20:08:40 +0100
committerSofox <sofoxx@gmail.com>2017-10-26 20:42:51 +0100
commit43cbef219b13ce9a491b353500f5d0e3dae30452 (patch)
tree580b57080430fc4b0b7b9beffeaf6e66ba7a6337 /scene/2d/parallax_layer.h
parent2987e6ce4ffc69da5efc0903cc00ce12e72d2125 (diff)
downloadredot-engine-43cbef219b13ce9a491b353500f5d0e3dae30452.tar.gz
Overhauled the ParallaxBackground system so that it works properly regardless of the zoom of the camera.
Diffstat (limited to 'scene/2d/parallax_layer.h')
-rw-r--r--scene/2d/parallax_layer.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/scene/2d/parallax_layer.h b/scene/2d/parallax_layer.h
index 95ca27c41a..6feb1fad67 100644
--- a/scene/2d/parallax_layer.h
+++ b/scene/2d/parallax_layer.h
@@ -43,6 +43,8 @@ class ParallaxLayer : public Node2D {
Vector2 mirroring;
void _update_mirroring();
+ Point2 screen_offset;
+
protected:
void _notification(int p_what);
static void _bind_methods();
@@ -57,7 +59,7 @@ public:
void set_mirroring(const Size2 &p_mirroring);
Size2 get_mirroring() const;
- void set_base_offset_and_scale(const Point2 &p_offset, float p_scale);
+ void set_base_offset_and_scale(const Point2 &p_offset, float p_scale, const Point2 &p_screen_offset);
virtual String get_configuration_warning() const;
ParallaxLayer();