Files
itgmania212121/Themes/default/BGAnimations/ScreenPlayerOptions background.lua
T
2014-08-30 16:14:03 -07:00

30 lines
896 B
Lua

local t = Def.ActorFrame {};
t[#t+1] = Def.ActorFrame {
Def.Sprite {
Condition=not GAMESTATE:IsCourseMode();
InitCommand=cmd(Center);
OnCommand=function(self)
if GAMESTATE:GetCurrentSong() then
local song = GAMESTATE:GetCurrentSong();
if song:HasBackground() then
self:LoadBackground(song:GetBackgroundPath());
end;
self:scale_or_crop_background();
(cmd(fadebottom,0.25;fadetop,0.25;croptop,48/480;cropbottom,48/480))(self);
else
self:visible(false);
end
end;
};
Def.Quad {
InitCommand=cmd(Center;scaletoclipped,SCREEN_WIDTH+1,SCREEN_HEIGHT);
OnCommand=cmd(diffuse,color("#FFCB05");diffusebottomedge,color("#F0BA00");diffusealpha,0.45);
};
LoadActor(THEME:GetPathB("ScreenWithMenuElements","background/_bg top")) .. {
InitCommand=cmd(Center;scaletoclipped,SCREEN_WIDTH+1,SCREEN_HEIGHT);
OnCommand=cmd(diffusealpha,0.5);
};
};
return t