diff --git a/stdlib/textures.pz b/stdlib/textures.pz index 2c6c4f9..157d4a7 100644 --- a/stdlib/textures.pz +++ b/stdlib/textures.pz @@ -24,3 +24,14 @@ func animate(name, speed, &blk) intMaterial(:material, :texture) blk(frame) popScope() + +func slideshow(image_list, slideshow_speed, animation_speed, &blk) + slideshow_speed := 1 + image = image_list[(slideshow_speed * time) % length(image_list)] + animation_speed := 10 + if (isNull(blk)) + animate(image, animation_speed) + else + animate(image, animation_speed) + blk() +