Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --I'ma call it the fuck you people with fucking huge cdtitles script, With Love - Jousway
- local t = Def.ActorFrame {
- Def.Sprite {
- Name="CDTitle";
- InitCommand=cmd(x,SCREEN_CENTER_X-160+90;y,SCREEN_TOP+160+(36/2)+8);
- OnCommand=cmd(draworder,106;shadowlength,1;zoom,0.75;diffusealpha,1;zoom,0;bounceend,0.35;zoom,0.75;spin;effectmagnitude,0,180,0);
- };
- };
- local function Update(self)
- local song = GAMESTATE:GetCurrentSong();
- local cdtitle = self:GetChild("CDTitle");
- local height = cdtitle:GetHeight();
- local width = cdtitle:GetWidth();
- if song then
- if song:HasCDTitle() then
- cdtitle:visible(true);
- cdtitle:Load(song:GetCDTitlePath());
- else
- cdtitle:visible(false);
- end;
- else
- cdtitle:visible(false);
- end;
- if height >= 80 and width >= 80 then
- if height >= width then
- cdtitle:zoom(80/height);
- else
- cdtitle:zoom(80/width);
- end;
- elseif height >= 80 then
- cdtitle:zoom(80/height);
- elseif width >= 80 then
- cdtitle:zoom(80/width);
- else
- cdtitle:zoom(1);
- end;
- end;
- t.InitCommand=cmd(SetUpdateFunction,Update);
- return t
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement