summaryrefslogtreecommitdiffstats
path: root/nodes
diff options
context:
space:
mode:
authorPiotr Dobrowolski <admin@tastycode.pl>2017-01-17 18:23:59 +0100
committerPiotr Dobrowolski <admin@tastycode.pl>2017-01-17 18:23:59 +0100
commitb001c3143aeb4e5ff72c8ed4c6f80cbd3f4145ed (patch)
treea5ac54a5578a933dd80572a21051a28c23777cc1 /nodes
parent44ebc5c604853ab70cb50e3101736c6211be84c3 (diff)
downloadlove2d-signage-b001c3143aeb4e5ff72c8ed4c6f80cbd3f4145ed.tar.gz
love2d-signage-b001c3143aeb4e5ff72c8ed4c6f80cbd3f4145ed.tar.bz2
love2d-signage-b001c3143aeb4e5ff72c8ed4c6f80cbd3f4145ed.tar.xz
love2d-signage-b001c3143aeb4e5ff72c8ed4c6f80cbd3f4145ed.zip
Fix image cycling in slideshow when using directories
Diffstat (limited to 'nodes')
-rw-r--r--nodes/slideshow.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/nodes/slideshow.lua b/nodes/slideshow.lua
index e209f60..7c051be 100644
--- a/nodes/slideshow.lua
+++ b/nodes/slideshow.lua
@@ -11,7 +11,7 @@ function node:loadImage()
local files = self:processFiles(self.files)
if files ~= nil then
if self.fileName then
- self.fileName = files[(lume.find(self.files, self.fileName) or 1) % #self.files + 1]
+ self.fileName = files[(lume.find(files, self.fileName) or 1) % #files + 1]
else
self.fileName = files[1]
end