Advertisement
Jousway

ScreenWithElements Background default.lua

May 10th, 2011
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.52 KB | None | 0 0
  1. --local curGameName = GAMESTATE:GetCurrentGame():GetName();
  2.  
  3. --local curScreenName = GAMECOMMAND:GetScreen():GetName();
  4.  
  5. --local bg = getenv("Background");
  6.  
  7. local t = Def.ActorFrame {
  8.     LoadActor(tostring(math.random(1,7)))..{
  9.     --[[need to fix this --Get Background from ScreenTitleMenu background
  10.     LoadActor(bg)..{--]]
  11.         InitCommand=cmd(Center;scaletoclipped,SCREEN_WIDTH,SCREEN_HEIGHT);
  12.     };
  13.     LoadActor("bgtop") .. {
  14.         InitCommand=cmd(Center;addy,-90;zoom,0.6);
  15.     };
  16. --[[need to fix this
  17.     LoadActor("bgtop") .. {
  18.         InitCommand=function(self);
  19.             if curScreenName == "ScreenSelectMusic" or "ScreenOptions" or "ScreenEvaluation" then
  20.             self:cmd(diffusealpha,0;Center;addy,-90;zoom,0.6);
  21.             else
  22.             self:cmd(diffusealpha,1;Center;addy,-90;zoom,0.6);
  23.             end;
  24.         end;
  25.     };--]]
  26.     LoadActor("bgbottom") .. {
  27.         InitCommand=cmd(Center;addy,60;zoom,0.6);
  28.         OnCommand=cmd(zoomy,0;linear,0.1;zoomy,0.6);
  29.         OffCommand=cmd(zoomy,0.6;linear,0.1;zoomy,0;linear,0.1;zoomy,0.6;);
  30.     };
  31.     --show Current Gametype
  32.     LoadFont("_dejavu sans Bold") .. {
  33.         InitCommand=cmd(zoom,0.5;);
  34.         OnCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_TOP+10);
  35.         BeginCommand=function(self)
  36.             self:settextf( Screen.String("CurrentGametype"), curGameName );
  37.         end;
  38.     };
  39.     --show Life Difficulty
  40.     Def.ActorFrame {
  41.         LoadFont("_dejavu sans Bold") .. {
  42.             Text=": Life Difficulty";
  43.             InitCommand=cmd(horizalign,right;zoom,0.5);
  44.             OnCommand=cmd(shadowlength,1);
  45.         };
  46.         LoadFont("_dejavu sans Bold") .. {
  47.             Text=GetLifeDifficulty();
  48.             AltText="";
  49.             InitCommand=cmd(x,-89;horizalign,right;zoom,0.5);
  50.             OnCommand=cmd(shadowlength,1);         
  51.         };
  52.         OnCommand=cmd(x,SCREEN_RIGHT-10;y,SCREEN_TOP+10);
  53.     };
  54.     --show Timing Difficulty
  55.     Def.ActorFrame {
  56.         LoadFont("_dejavu sans Bold") .. {
  57.             Text="Timing Difficulty :";
  58.             InitCommand=cmd(horizalign,left;zoom,0.5);
  59.             OnCommand=cmd(shadowlength,1);
  60.         };
  61.         LoadFont("_dejavu sans Bold") .. {
  62.             Text=GetTimingDifficulty();
  63.             AltText="";
  64.             InitCommand=cmd(x,105;horizalign,left;zoom,0.5);
  65.             OnCommand=function(self)
  66.                 (cmd(shadowlength,1))(self);
  67.                 if GetTimingDifficulty() == 9 then
  68.                     self:settext("Justice");
  69.                     (cmd())(self);
  70.                 else
  71.                     self:settext( GetTimingDifficulty() );
  72.                 end
  73.             end;
  74.         };
  75.         OnCommand=cmd(x,SCREEN_LEFT+10;y,SCREEN_TOP+10);
  76.     };
  77.     --show Stepmania Version
  78.     LoadFont("Common Normal") .. {
  79.         OnCommand=cmd(settext," Version "..ProductVersion().." - Built "..VersionDate();horizalign,left;shadowlength,1;zoom,0.5;rotationz,-90;x,SCREEN_RIGHT-10;y,SCREEN_BOTTOM);
  80.     };
  81. };
  82. return t;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement