Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local song = GAMESTATE:GetCurrentSong();
- local startoffset = song:GetFirstBeat(); --There is no proper way to get video offset sadly
- return Def.ActorFrame {
- Def.Sprite {
- InitCommand=cmd(stretchto,0,0,SCREEN_WIDTH/550,SCREEN_HEIGHT/294;x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y-32);
- OnCommand=cmd(sleep,startoffset;queuecommand,"Second");
- SecondCommand=function(self)
- if song then
- local songDir = song:GetSongDir();
- local dir = FILEMAN:GetDirListing(songDir);
- local fileToLoad = nil;
- local wat = 1;
- for i=1,#dir do
- if string.find(dir[i],".avi") then
- fileToLoad = dir[i];
- wat = 0;
- self:Load(songDir..fileToLoad);
- elseif string.find(dir[i],".png") and wat == 1 then
- fileToLoad = dir[i];
- self:Load(songDir..fileToLoad);
- self:zoomx((SCREEN_WIDTH/2.15)/self:GetWidth());
- self:zoomy((416)/self:GetHeight());
- end;
- end;
- else
- -- fallback crap for not having a song
- end
- end,
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement