Code: Select all
function widget:Initialize()
wavFiles = VFS.DirList('music/', '*.wav')
for k,v in pairs(wavFiles) do Spring.PlaySoundFile (v,1) end
end
problems/questions:
-currently it plays all files at the same time, how to fix that?
-if i reload it i see that i get the error, could not play "2" no such file, i had a file named 2 in the music folder, so the widget does not refresh the list, help?
-when you disable it it doesnt disables, i think i know how to fix that, I'll do that later