layer.add_frame(frame)
layer.move((0, -5, 5)[ii])
layer.location.bottom = self.ds.get_height()
+ layer.add_location(offset=(0, -layer.location.h))
layers.append(layer)
def update(self):
ds.set_clip(fr.topleft, (ds.get_width(), ds.get_height() - fr.top))
for ii, layer in enumerate(self.layers):
layer.move(dy=1 + (ii * .5))
- if layer.location.top > fr.top:
- layer.location.bottom = ds.get_height() + layer.location.top - \
- fr.top
+ if layer.location.top > ds.get_height():
+ layer.move(dy=-layer.location.h)
layer.update()
ds.set_clip(None)