Advertisement
xepher95

mascaras!

Apr 14th, 2013
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.33 KB | None | 0 0
  1. return Def.ActorFrame {
  2.     SongChosenMessageCommand=cmd();
  3.     TwoPartConfirmCanceledMessageCommand=cmd();
  4.     SongUnchosenMessageCommand=cmd();
  5.  
  6.     LoadActor("bannermask") .. {
  7.         InitCommand=cmd(scaletoclipped,452,452;clearzbuffer,true;zwrite,true;blend,"BlendMode_NoEffect");
  8.     };
  9.    
  10.    
  11.     Def.Banner {
  12.         Name="SongBanner";
  13.         InitCommand=cmd(scaletoclipped,450,450;ztest,true);
  14.         SetMessageCommand=function(self,params)
  15.             local path = params.Song:GetBannerPath()
  16.             if not path then path = THEME:GetPathG("Common","fallback banner") end
  17.            
  18.             local bHighResTextures = PREFSMAN:GetPreference("HighResolutionTextures")
  19.            
  20.             --banner loading stuff...
  21.             --is on
  22.             if bHighResTextures == 'HighResolutionTextures_ForceOn' or GetUserPrefB("goodbanners") then
  23.                 self:LoadFromSong(params.Song);
  24.             --is off
  25.             elseif bHighResTextures == 'HighResolutionTextures_ForceOff' then
  26.                 self:LoadFromCachedBanner(path);
  27.             --is auto
  28.             elseif bHighResTextures == 'HighResolutionTextures_Auto' then
  29.                 local iWidth = DISPLAY:GetDisplayHeight()
  30.                 --display is over ninethousand eh... 480
  31.                 if iWidth > 480 then
  32.                     self:LoadFromSong(params.Song);
  33.                 --display is 480 or less
  34.                 else
  35.                     self:LoadFromCachedBanner(path);
  36.                 end
  37.             end
  38.         end;
  39.     };
  40.    
  41.     LoadActor("Title-Mask") .. {
  42.         InitCommand=cmd(scaletoclipped,455,455);
  43.     };
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement