Fallback handled. Yes, I tested this.

This commit is contained in:
Jason Felds
2013-07-03 20:08:34 -04:00
parent a5ef44a838
commit 986d510a88
29 changed files with 1314 additions and 793 deletions
@@ -1,14 +1,21 @@
local t = Def.ActorFrame { local t = Def.ActorFrame {
Def.ActorFrame { Def.ActorFrame {
InitCommand=cmd(Center); InitCommand=function(self)
--[[ ToggleConsoleDisplayMessageCommand=function(self) self:Center();
end;
--[[
ToggleConsoleDisplayMessageCommand=function(self)
bVisible = 1 - bVisible; bVisible = 1 - bVisible;
bShow = (bVisible >= 1) and true or false; bShow = (bVisible >= 1) and true or false;
self:visible(bShow); self:visible(bShow);
end; --]] end;
--]]
Def.Quad { Def.Quad {
InitCommand(zoomto,64,64;spin;); InitCommand(zoomto,64,64;spin;);
ToggleConsoleDisplayMessageCommand=cmd(zoomto,345,345;visible,true); ToggleConsoleDisplayMessageCommand=function(self)
self:zoomto(345, 345);
self:visible(true);
end;
}; };
}; };
}; };
@@ -117,8 +117,18 @@ local sections = {
-- To add people or sections modify the above. -- To add people or sections modify the above.
local lineOn = cmd(zoom,0.875;strokecolor,color("#444444");shadowcolor,color("#444444");shadowlength,3) local lineOn = function(self)
local sectionOn = cmd(diffuse,color("#88DDFF");strokecolor,color("#446688");shadowcolor,color("#446688");shadowlength,3) self:zoom(0.875);
self:strokecolor(color("#444444"));
self:shadowcolor(color("#444444"));
self:shadowlength(3);
end;
local sectionOn = function(self)
self:diffuse(color("#88DDFF"));
self:strokecolor(color("#446688"));
self:shadowcolor(color("#446688"));
self:shadowlength(3);
end;
local item_padding_start = 4; local item_padding_start = 4;
local creditScroller = Def.ActorScroller { local creditScroller = Def.ActorScroller {
@@ -127,7 +137,9 @@ local creditScroller = Def.ActorScroller {
TransformFunction = function( self, offset, itemIndex, numItems) TransformFunction = function( self, offset, itemIndex, numItems)
self:y(30*offset) self:y(30*offset)
end; end;
OnCommand = cmd(scrollwithpadding,item_padding_start,15); OnCommand = function(self)
self:scrollwithpadding(item_padding_start, 15);
end;
} }
local function AddLine( text, command ) local function AddLine( text, command )
@@ -156,6 +168,9 @@ end;
return Def.ActorFrame{ return Def.ActorFrame{
creditScroller..{ creditScroller..{
InitCommand=cmd(CenterX;y,SCREEN_BOTTOM-64), InitCommand=function(self)
self:CenterX();
self:y(SCREEN_BOTTOM - 64);
end;
} }
}; };
@@ -1,39 +1,83 @@
local t = Def.ActorFrame {}; local t = Def.ActorFrame {};
t[#t+1] = Def.ActorFrame { t[#t+1] = Def.ActorFrame {
InitCommand=cmd(Center); InitCommand=function(self)
self:Center();
end;
Def.Quad { Def.Quad {
InitCommand=cmd(scaletoclipped,SCREEN_WIDTH,SCREEN_HEIGHT); InitCommand=function(self)
OnCommand=cmd(diffuse,color("0,0,0,1");diffusetopedge,color("0.1,0.1,0.1,1")); self:scaletoclipped(SCREEN_WIDTH, SCREEN_HEIGHT);
end;
OnCommand=function(self)
self:diffuse(color("0,0,0,1"));
self:diffusetopedge(color("0.1,0.1,0.1,1"));
end;
}; };
}; };
t[#t+1] = Def.ActorFrame { t[#t+1] = Def.ActorFrame {
InitCommand=cmd(Center); InitCommand=function(self)
self:Center();
end;
Def.ActorFrame { Def.ActorFrame {
Def.Quad { Def.Quad {
InitCommand=cmd(zoomto,SCREEN_WIDTH,128); InitCommand=function(self)
OnCommand=cmd(diffusealpha,1;sleep,1.5;linear,0.25); self:zoomto(SCREEN_WIDTH, 128);
end;
OnCommand=function(self)
self:diffusealpha(1);
self:sleep(1.5);
self:linear(0.25);
end;
}; };
LoadActor("ssc") .. { LoadActor("ssc") .. {
OnCommand=cmd(diffusealpha,0;linear,1;diffusealpha,1;sleep,0.75;linear,0.25;diffusealpha,0); OnCommand=function(self)
self:diffusealpha(0);
self:linear(1);
self:diffusealpha(1);
self:sleep(0.75);
self:linear(0.25);
self:diffusealpha(0);
end;
}; };
}; };
Def.ActorFrame { Def.ActorFrame {
OnCommand=cmd(playcommandonchildren,"ChildrenOn"); OnCommand=function(self)
ChildrenOnCommand=cmd(diffusealpha,0;sleep,2;linear,0.25;diffusealpha,1); self:playcommandonchildren("ChildrenOn");
end;
ChildrenOnCommand=function(self)
self:diffusealpha(0);
self:sleep(2);
self:linear(0.25);
self:diffusealpha(1);
end;
LoadFont("Common Normal") .. { LoadFont("Common Normal") .. {
Text=ProductID(); Text=ProductID();
InitCommand=cmd(y,-20;zoom,0.75); InitCommand=function(self)
OnCommand=cmd(diffuse,color("0,0,0,1");strokecolor,color("#f7941d")); self:y(-20);
self:zoom(0.75);
end;
OnCommand=function(self)
self:diffuse(color("0,0,0,1"));
self:strokecolor(color("#f7941d"));
end;
}; };
LoadFont("Common Normal") .. { LoadFont("Common Normal") .. {
Text=THEME:GetThemeDisplayName(); Text=THEME:GetThemeDisplayName();
OnCommand=cmd(diffuse,color("0,0,0,1");strokecolor,color("#f7941d")); OnCommand=function(self)
self:diffuse(color("0,0,0,1"));
self:strokecolor(color("#f7941d"));
end;
}; };
LoadFont("Common Normal") .. { LoadFont("Common Normal") .. {
Text="Created by " .. THEME:GetThemeAuthor(); Text="Created by " .. THEME:GetThemeAuthor();
InitCommand=cmd(y,24;zoom,0.75); InitCommand=function(self)
OnCommand=cmd(diffuse,color("0,0,0,1");strokecolor,color("#f7941d")); self:y(24);
self:zoom(0.75);
end;
OnCommand=function(self)
self:diffuse(color("0,0,0,1"));
self:strokecolor(color("#f7941d"));
end;
}; };
}; };
}; };
@@ -1,26 +1,68 @@
local waitTime = 7.5 local waitTime = 7.5
local t = Def.ActorFrame { local t = Def.ActorFrame {
InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y); InitCommand=function(self)
OnCommand=cmd(queuecommand,"TweenOn";sleep,waitTime;queuecommand,"TweenOff"); self:x(SCREEN_CENTER_X);
self:y(SCREEN_CENTER_Y);
end;
OnCommand=function(self)
self:queuecommand("TweenOn");
self:sleep(waitTime);
self:queuecommand("TweenOff");
end;
} }
t[#t+1] = Def.Quad { t[#t+1] = Def.Quad {
InitCommand=cmd(zoomto,SCREEN_WIDTH,SCREEN_HEIGHT;diffuse,Color.Black); InitCommand=function(self)
TweenOnCommand=cmd(diffusealpha,1;linear,0.5;diffusealpha,0.8); self:zoomto(SCREEN_WIDTH, SCREEN_HEIGHT);
TweenOffCommand=cmd(linear,0.5;diffusealpha,0); self:diffuse(Color.Black);
end;
TweenOnCommand=function(self)
self:diffusealpha(1);
self:linear(0.5);
self:diffusealpha(0.8);
end;
TweenOffCommand=function(self)
self:linear(0.5);
self:diffusealpha(0);
end;
}; };
t[#t+1] = Def.ActorFrame { t[#t+1] = Def.ActorFrame {
LoadFont("Common Normal") .. { LoadFont("Common Normal") .. {
Text=ScreenString("WarningHeader"); Text=ScreenString("WarningHeader");
InitCommand=cmd(y,-70;diffuse,Color.Red); InitCommand=function(self)
TweenOnCommand=cmd(diffusealpha,0;zoomx,2;zoomy,0;sleep,0.5;smooth,0.25;zoom,1;diffusealpha,1); self:y(-70);
TweenOffCommand=cmd(linear,0.5;diffusealpha,0); self:diffuse(Color.Red);
end;
TweenOnCommand=function(self)
self:diffusealpha(0);
self:zoomx(2);
self:zoomy(0);
self:sleep(0.5);
self:smooth(0.25);
self:zoom(1);
self:diffusealpha(1);
end;
TweenOffCommand=function(self)
self:linear(0.5);
self:diffusealpha(0);
end;
}; };
LoadFont("Common Normal") .. { LoadFont("Common Normal") .. {
Text=ScreenString("WarningText"); Text=ScreenString("WarningText");
InitCommand=cmd(y,10;wrapwidthpixels,SCREEN_WIDTH-48); InitCommand=function(self)
TweenOnCommand=cmd(diffusealpha,0;sleep,0.5125;linear,0.125;diffusealpha,1); self:y(10);
TweenOffCommand=cmd(linear,0.5;diffusealpha,0); self:wrapwidthpixels(SCREEN_WIDTH - 48);
end;
TweenOnCommand=function(self)
self:diffusealpha(0);
self:sleep(0.5125);
self:linear(0.125);
self:diffusealpha(1);
end;
TweenOffCommand=function(self)
self:linear(0.5);
self:diffusealpha(0);
end;
}; };
}; };
@@ -7,21 +7,33 @@ local Players = GAMESTATE:GetHumanPlayers();
local t = Def.ActorFrame {}; local t = Def.ActorFrame {};
-- Is Anyone Enabled To Join -- Is Anyone Enabled To Join
t[#t+1] = Def.ActorFrame { t[#t+1] = Def.ActorFrame {
InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y); InitCommand=function(self)
self:x(SCREEN_CENTER_X);
self:y(SCREEN_CENTER_Y);
end;
LoadFont("Common Normal") .. { LoadFont("Common Normal") .. {
Text="A player has a high score"; Text="A player has a high score";
BeginCommand=cmd(visible,SCREENMAN:GetTopScreen():GetAnyEntering()); BeginCommand=function(self)
self:visible(SCREENMAN:GetTopScreen():GetAnyEntering());
end;
}; };
LoadFont("Common Normal") .. { LoadFont("Common Normal") .. {
Text="No players has a high score"; Text="No players has a high score";
BeginCommand=cmd(visible,not SCREENMAN:GetTopScreen():GetAnyEntering()); BeginCommand=function(self)
self:visible(not SCREENMAN:GetTopScreen():GetAnyEntering());
end;
}; };
--[[ for pn in ivalues(Players) do --[[
for pn in ivalues(Players) do
LoadFont("Common Normal") .. { LoadFont("Common Normal") .. {
Text=ToEnumShortString(pn); Text=ToEnumShortString(pn);
InitCommand=cmd(x,128 * tMath[pn];y,32); InitCommand=function(self)
self:x(128 * tMath[pn]);
self:y(32);
end
}; };
end --]] end
--]]
}; };
-- --
t[#t+1] = Def.Actor { t[#t+1] = Def.Actor {
@@ -20,11 +20,17 @@ end
local MapNameToLetter = {}; local MapNameToLetter = {};
local MapLetterToName = {}; local MapLetterToName = {};
local letter = LoadFont("Common Normal")..{ local letter = LoadFont("Common Normal")..{
InitCommand=cmd(zoom,0.8;shadowlength,0); InitCommand=function(self)
self:zoom(0.8);
self:shadowlength(0);
end;
PulseCommand = function(self) PulseCommand = function(self)
self:finishtweening(); self:finishtweening();
local z = self:GetZoomX(); local z = self:GetZoomX();
(cmd(accelerate,0.15;zoom,1.2;decelerate,0.15;zoom,z))(self); self:accelerate(0.15);
self:zoom(1.2);
self:decelerate(0.15);
self:zoom(z);
end; end;
}; };
@@ -56,22 +62,28 @@ for pn in ivalues(PlayerNumber) do
LoadActor(CursorFiles[pn]) LoadActor(CursorFiles[pn])
)..{ )..{
Name = CursorFiles[pn]; Name = CursorFiles[pn];
BeginCommand = cmd(visible,SCREENMAN:GetTopScreen():GetEnteringName(pn)); BeginCommand = function(self)
OnCommand = cmd( self:visible(SCREENMAN:GetTopScreen():GetEnteringName(pn));
zoom,0; end;
rotationz,-360*2; OnCommand = function(self)
sleep,0.55; self:zoom(0);
decelerate,0.5; self:rotationz(-360 * 2);
zoom,1; self:sleep(0.55);
rotationz,0; self:decelerate(0.5);
); self:zoom(1);
OffCommand = cmd(sleep,0.3;queuecommand,"TweenOff"); self:rotationz(0);
end;
OffCommand = function(self)
self:sleep(0.3);
self:queuecommand("TweenOff");
end;
PlayerFinishedMessageCommand = function(self,param) PlayerFinishedMessageCommand = function(self,param)
if param.PlayerNumber ~= pn then return end if param.PlayerNumber ~= pn then return end
self:playcommand("TweenOff" ); self:playcommand("TweenOff" );
end; end;
TweenOffCommand = function(self,param) TweenOffCommand = function(self,param)
(cmd(accelerate,0.25;zoomx,0;))(self); self:accelerate(0.25);
self:zoomx(0);
end; end;
}; };
end end
@@ -231,7 +243,12 @@ return Def.ActorFrame {
Selection[pn] = key; Selection[pn] = key;
c.Cursors[pn]:stoptweening(); c.Cursors[pn]:stoptweening();
c.Cursors[pn]:playcommand( "SetSize", { Width=Keys[key].Width+6; tween=cmd(stoptweening;linear,0.10); } ); c.Cursors[pn]:playcommand( "SetSize", {
Width=Keys[key].Width+6; tween=function(self)
self:stoptweening();
self:linear(0.10);
end;
} );
c.Cursors[pn]:x( Keys[key].Text:GetX() ); c.Cursors[pn]:x( Keys[key].Text:GetX() );
c.Cursors[pn]:y( Keys[key].Text:GetY() ); c.Cursors[pn]:y( Keys[key].Text:GetY() );
if not param.NoStore then if not param.NoStore then
@@ -249,11 +266,14 @@ return Def.ActorFrame {
OnCommand = function(self, param) OnCommand = function(self, param)
for key in ivalues(Letters) do for key in ivalues(Letters) do
local fDist = distance( Keys[key].Text:GetX(), Keys[key].Text:GetY(), 0, 100 ); local fDist = distance( Keys[key].Text:GetX(), Keys[key].Text:GetY(), 0, 100 );
local f = cmd( local f = function(self)
diffusealpha,0;zoom,0; self:diffusealpha(0);
sleep,0.25 + (fDist / 400); self:zoom(0);
decelerate,0.5; self:sleep(0.25 + (fDist / 400));
diffusealpha,1;zoom,0.8); self:decelerate(0.5);
self:diffusealpha(1);
self:zoom(0.8);
end;
f(Keys[key].Text); f(Keys[key].Text);
end end
end; end;
@@ -261,10 +281,12 @@ return Def.ActorFrame {
OffCommand = function(self, param) OffCommand = function(self, param)
for key in ivalues(Letters) do for key in ivalues(Letters) do
local fDist = distance( Keys[key].Text:GetX(), Keys[key].Text:GetY(), 0, 100 ); local fDist = distance( Keys[key].Text:GetX(), Keys[key].Text:GetY(), 0, 100 );
local f = cmd( local f = function(self)
sleep,0.0 + (fDist / 400); self:sleep(0.0 + (fDist / 400));
decelerate,0.5; self:decelerate(0.5);
diffusealpha,0;zoom,0); self:diffusealpha(0);
self:zoom(0);
end;
f(Keys[key].Text); f(Keys[key].Text);
end end
end; end;
@@ -1,8 +1,17 @@
local t = Def.ActorFrame{ local t = Def.ActorFrame{
LoadActor("noise")..{ LoadActor("noise")..{
Name="Noise"; Name="Noise";
InitCommand=cmd(Center;texturewrapping,true;SetTextureFiltering,false;zoom,2;diffusealpha,0;); InitCommand=function(self)
OnCommand=cmd(linear,1;diffusealpha,1); self:Center();
self:texturewrapping(true);
self:SetTextureFiltering(false);
self:zoom(2);
self:diffusealpha(0);
end;
OnCommand=function(self)
self:linear(1);
self:diffusealpha(1);
end;
}; };
}; };
@@ -12,6 +21,8 @@ local function Update(self)
local y = math.random(); local y = math.random();
c:customtexturerect(0+x,0+y,2+x,2+y); c:customtexturerect(0+x,0+y,2+x,2+y);
end; end;
t.InitCommand = cmd(SetUpdateFunction,Update); t.InitCommand = function(self)
self:SetUpdateFunction(Update);
end;
return t; return t;
@@ -1,13 +1,24 @@
local x = Def.ActorFrame{ local x = Def.ActorFrame{
Def.Quad{ Def.Quad{
InitCommand=cmd(Center;zoomto,SCREEN_WIDTH,80;diffuse,color("0,0,0,0.5")); InitCommand=function(self)
OnCommand=cmd(); self:Center();
OffCommand=cmd(); self:zoomto(SCREEN_WIDTH, 80);
self:diffuse(color("0,0,0,0.5"));
end;
OnCommand=function(self) end;
OffCommand=function(self) end;
}; };
LoadFont("Common Normal")..{ LoadFont("Common Normal")..{
Text=ScreenString("Loading Profiles"); Text=ScreenString("Loading Profiles");
InitCommand=cmd(Center;diffuse,color("1,1,1,1");shadowlength,1); InitCommand=function(self)
OffCommand=cmd(linear,0.15;diffusealpha,0); self:Center();
self:diffuse(color("1,1,1,1"));
self:shadowlength(1);
end;
OffCommand=function(self)
self:linear(0.15);
self:diffusealpha(0);
end;
}; };
}; };
@@ -1,13 +1,24 @@
local x = Def.ActorFrame{ local x = Def.ActorFrame{
Def.Quad{ Def.Quad{
InitCommand=cmd(Center;zoomto,SCREEN_WIDTH,80;diffuse,color("0,0,0,0.5")); InitCommand=function(self)
OnCommand=cmd(); self:Center();
OffCommand=cmd(); self:zoomto(SCREEN_WIDTH, 80);
self:diffuse(color("0,0,0,0.5"));
end;
OnCommand=function(self) end;
OffCommand=function(self) end;
}; };
LoadFont("Common Normal")..{ LoadFont("Common Normal")..{
Text=ScreenString("Saving Profiles"); Text=ScreenString("Saving Profiles");
InitCommand=cmd(Center;diffuse,color("1,1,1,1");shadowlength,1); InitCommand=function(self)
OffCommand=cmd(linear,0.15;diffusealpha,0); self:Center();
self:diffuse(color("1,1,1,1"));
self:shadowlength(1);
end;
OffCommand=function(self)
self:linear(0.15);
self:diffusealpha(0);
end;
}; };
}; };
@@ -4,16 +4,24 @@ function GetLocalProfiles()
for p = 0,PROFILEMAN:GetNumLocalProfiles()-1 do for p = 0,PROFILEMAN:GetNumLocalProfiles()-1 do
local profile=PROFILEMAN:GetLocalProfileFromIndex(p); local profile=PROFILEMAN:GetLocalProfileFromIndex(p);
local ProfileCard = Def.ActorFrame { local ProfileCard = Def.ActorFrame {
--[[ Def.Quad {
InitCommand=cmd(zoomto,200,1;y,40/2);
OnCommand=cmd(diffuse,Color('Outline'););
}; --]]
LoadFont("Common Normal") .. { LoadFont("Common Normal") .. {
Text=profile:GetDisplayName(); Text=profile:GetDisplayName();
InitCommand=cmd(shadowlength,1;y,-10;zoom,1;ztest,true); InitCommand=function(self)
self:shadowlength(1);
self:y(-10);
self:zoom(1);
self:ztest(true);
end;
}; };
LoadFont("Common Normal") .. { LoadFont("Common Normal") .. {
InitCommand=cmd(shadowlength,1;y,8;zoom,0.5;vertspacing,-8;ztest,true); InitCommand=function(self)
self:shadowlength(1);
self:y(8);
self:zoom(0.5);
self:vertspacing(-8);
self:ztest(true);
end;
BeginCommand=function(self) BeginCommand=function(self)
local numSongsPlayed = profile:GetNumTotalSongsPlayed(); local numSongsPlayed = profile:GetNumTotalSongsPlayed();
local s = numSongsPlayed == 1 and "Song" or "Songs"; local s = numSongsPlayed == 1 and "Song" or "Songs";
@@ -31,7 +39,9 @@ end;
function LoadCard(cColor) function LoadCard(cColor)
local t = Def.ActorFrame { local t = Def.ActorFrame {
LoadActor( THEME:GetPathG("ScreenSelectProfile","CardBackground") ) .. { LoadActor( THEME:GetPathG("ScreenSelectProfile","CardBackground") ) .. {
InitCommand=cmd(diffuse,cColor); InitCommand=function(self)
self:diffuse(cColor);
end;
}; };
LoadActor( THEME:GetPathG("ScreenSelectProfile","CardFrame") ); LoadActor( THEME:GetPathG("ScreenSelectProfile","CardFrame") );
}; };
@@ -48,18 +58,17 @@ function LoadPlayerStuff(Player)
t[#t+1] = Def.ActorFrame { t[#t+1] = Def.ActorFrame {
Name = 'JoinFrame'; Name = 'JoinFrame';
LoadCard(Color('Orange')); LoadCard(Color('Orange'));
--[[ Def.Quad {
InitCommand=cmd(zoomto,200+4,230+4);
OnCommand=cmd(shadowlength,1;diffuse,color("0,0,0,0.5"));
};
Def.Quad {
InitCommand=cmd(zoomto,200,230);
OnCommand=cmd(diffuse,Color('Orange');diffusealpha,0.5);
}; --]]
LoadFont("Common Normal") .. { LoadFont("Common Normal") .. {
Text="Press &START; to join."; Text="Press &START; to join.";
InitCommand=cmd(shadowlength,1); InitCommand=function(self)
OnCommand=cmd(diffuseshift;effectcolor1,Color('White');effectcolor2,color("0.5,0.5,0.5")); self:shadowlength(1);
end;
OnCommand=function(self)
self:diffuseshift();
self:effectcolor1(Color('White'));
self:effectcolor2(color("0.5,0.5,0.5"));
end;
}; };
}; };
@@ -69,37 +78,65 @@ function LoadPlayerStuff(Player)
}; };
t[#t+1] = Def.ActorFrame { t[#t+1] = Def.ActorFrame {
Name = 'SmallFrame'; Name = 'SmallFrame';
InitCommand=cmd(y,-2); InitCommand=function(self)
self:y(-2);
end;
Def.Quad { Def.Quad {
InitCommand=cmd(zoomto,200-10,40+2); InitCommand=function(self)
OnCommand=cmd(diffuse,Color('Black');diffusealpha,0.5); self:zoomto(200 - 10, 40 + 2);
end;
OnCommand=function(self)
self:diffuse(Color('Black'));
self:diffusealpha(0.5);
end;
}; };
Def.Quad { Def.Quad {
InitCommand=cmd(zoomto,200-10,40); InitCommand=function(self)
OnCommand=cmd(diffuse,PlayerColor(Player);fadeleft,0.25;faderight,0.25;glow,color("1,1,1,0.25")); self:zoomto(200 - 10, 40);
end;
OnCommand=function(self)
self:diffuse(PlayerColor(Player));
self:fadeleft(0.25);
self:faderight(0.25);
self:glow(color("1,1,1,0.25"));
end;
}; };
Def.Quad { Def.Quad {
InitCommand=cmd(zoomto,200-10,40;y,-40/2+20); InitCommand=function(self)
OnCommand=cmd(diffuse,Color("Black");fadebottom,1;diffusealpha,0.35); self:zoomto(200 - 10, 40);
self:y(-40 / 2 + 20);
end;
OnCommand=function(self)
self:diffuse(Color("Black"));
self:fadebottom(1);
self:diffusealpha(0.35);
end;
}; };
Def.Quad { Def.Quad {
InitCommand=cmd(zoomto,200-10,1;y,-40/2+1); InitCommand=function(self)
OnCommand=cmd(diffuse,PlayerColor(Player);glow,color("1,1,1,0.25")); self:zoomto(200 - 10, 1);
self:y(-40 / 2 + 1);
end;
OnCommand=function(self)
self:diffuse(PlayerColor(Player));
self:glow(color("1,1,1,0.25"));
end;
}; };
}; };
t[#t+1] = Def.ActorScroller{ t[#t+1] = Def.ActorScroller{
Name = 'Scroller'; Name = 'Scroller';
NumItemsToDraw=6; NumItemsToDraw=6;
-- InitCommand=cmd(y,-230/2+20;); OnCommand=function(self)
OnCommand=cmd(y,1;SetFastCatchup,true;SetMask,200,58;SetSecondsPerItem,0.15); self:y(1);
self:SetFastCatchup(true);
self:SetMask(200, 58);
self:SetSecondsPerItem(0.15);
end;
TransformFunction=function(self, offset, itemIndex, numItems) TransformFunction=function(self, offset, itemIndex, numItems)
local focus = scale(math.abs(offset),0,2,1,0); local focus = scale(math.abs(offset),0,2,1,0);
self:visible(false); self:visible(false);
self:y(math.floor( offset*40 )); self:y(math.floor( offset*40 ));
-- self:zoomy( focus );
-- self:z(-math.abs(offset));
-- self:zoom(focus);
end; end;
children = GetLocalProfiles(); children = GetLocalProfiles();
}; };
@@ -109,8 +146,10 @@ function LoadPlayerStuff(Player)
}; };
t[#t+1] = LoadFont("Common Normal") .. { t[#t+1] = LoadFont("Common Normal") .. {
Name = 'SelectedProfileText'; Name = 'SelectedProfileText';
--InitCommand=cmd(y,160;shadowlength,1;diffuse,PlayerColor(Player)); InitCommand=function(self)
InitCommand=cmd(y,160;shadowlength,1;); self:y(160);
self:shadowlength(1);
end;
}; };
return t; return t;
@@ -233,37 +272,67 @@ local t = Def.ActorFrame {
children = { children = {
Def.ActorFrame { Def.ActorFrame {
Name = 'P1Frame'; Name = 'P1Frame';
InitCommand=cmd(x,SCREEN_CENTER_X-160;y,SCREEN_CENTER_Y); InitCommand=function(self)
OnCommand=cmd(zoom,0;bounceend,0.35;zoom,1); self:x(SCREEN_CENTER_X - 160);
OffCommand=cmd(bouncebegin,0.35;zoom,0); self:y(SCREEN_CENTER_Y);
end;
OnCommand=function(self)
self:zoom(0);
self:bounceend(0.35);
self:zoom(1);
end;
OffCommand=function(self)
self:bouncebegin(0.35);
self:zoom(0);
end;
PlayerJoinedMessageCommand=function(self,param) PlayerJoinedMessageCommand=function(self,param)
if param.Player == PLAYER_1 then if param.Player == PLAYER_1 then
(cmd(;zoom,1.15;bounceend,0.175;zoom,1.0;))(self); self:zoom(1.15);
self:bounceend(0.175);
self:zoom(1.0);
end; end;
end; end;
children = LoadPlayerStuff(PLAYER_1); children = LoadPlayerStuff(PLAYER_1);
}; };
Def.ActorFrame { Def.ActorFrame {
Name = 'P2Frame'; Name = 'P2Frame';
InitCommand=cmd(x,SCREEN_CENTER_X+160;y,SCREEN_CENTER_Y); InitCommand=function(self)
OnCommand=cmd(zoom,0;bounceend,0.35;zoom,1); self:x(SCREEN_CENTER_X + 160);
OffCommand=cmd(bouncebegin,0.35;zoom,0); self:y(SCREEN_CENTER_Y);
end;
OnCommand=function(self)
self:zoom(0);
self:bounceend(0.35);
self:zoom(1);
end;
OffCommand=function(self)
self:bouncebegin(0.35);
self:zoom(0);
end;
PlayerJoinedMessageCommand=function(self,param) PlayerJoinedMessageCommand=function(self,param)
if param.Player == PLAYER_2 then if param.Player == PLAYER_2 then
(cmd(zoom,1.15;bounceend,0.175;zoom,1.0;))(self); self:zoom(1.15);
self:bounceend(0.175);
self:zoom(1.0);
end; end;
end; end;
children = LoadPlayerStuff(PLAYER_2); children = LoadPlayerStuff(PLAYER_2);
}; };
-- sounds -- sounds
LoadActor( THEME:GetPathS("Common","start") )..{ LoadActor( THEME:GetPathS("Common","start") )..{
StartButtonMessageCommand=cmd(play); StartButtonMessageCommand=function(self)
self:play();
end;
}; };
LoadActor( THEME:GetPathS("Common","cancel") )..{ LoadActor( THEME:GetPathS("Common","cancel") )..{
BackButtonMessageCommand=cmd(play); BackButtonMessageCommand=function(self)
self:play();
end;
}; };
LoadActor( THEME:GetPathS("Common","value") )..{ LoadActor( THEME:GetPathS("Common","value") )..{
DirectionButtonMessageCommand=cmd(play); DirectionButtonMessageCommand=function(self)
self:play();
end;
}; };
}; };
}; };
@@ -21,60 +21,57 @@ local function CreditsText( pn )
}; };
return text; return text;
end; end;
--[[ local function PlayerPane( PlayerNumber )
local t = Def.ActorFrame {
InitCommand=function(self)
self:name("PlayerPane" .. PlayerNumberToString(PlayerNumber));
-- ActorUtil.LoadAllCommandsAndSetXY(self,Var "LoadingScreen");
end
};
t[#t+1] = Def.ActorFrame {
Name = "Background";
Def.Quad {
InitCommand=cmd(zoomto,160,28;queuecommand,"On");
OnCommand=cmd(diffuse,PlayerColor(PlayerNumber);fadebottom,1);
};
};
t[#t+1] = LoadFont("Common","Normal") .. {
Name = "PlayerText";
InitCommand=cmd(x,-60;maxwidth,80/0.5;zoom,0.5;queuecommand,"On");
OnCommand=cmd(playcommand,"Set");
SetCommand=function(self)
local profile = PROFILEMAN:GetProfile( PlayerNumber) or PROFILEMAN:GetMachineProfile()
if profile then
self:settext( profile:GetDisplayName() );
else
self:settext( "NoProf" );
end
end;
};
return t
end --]]
-- --
local t = Def.ActorFrame {} local t = Def.ActorFrame {}
-- Aux -- Aux
t[#t+1] = LoadActor(THEME:GetPathB("ScreenSystemLayer","aux")); t[#t+1] = LoadActor(THEME:GetPathB("ScreenSystemLayer","aux"));
-- Credits -- Credits
t[#t+1] = Def.ActorFrame { t[#t+1] = Def.ActorFrame {
--[[ PlayerPane( PLAYER_1 ) .. {
InitCommand=cmd(x,scale(0.125,0,1,SCREEN_LEFT,SCREEN_WIDTH);y,SCREEN_BOTTOM-16)
}; --]]
CreditsText( PLAYER_1 ); CreditsText( PLAYER_1 );
CreditsText( PLAYER_2 ); CreditsText( PLAYER_2 );
}; };
-- Text -- Text
t[#t+1] = Def.ActorFrame { t[#t+1] = Def.ActorFrame {
Def.Quad { Def.Quad {
InitCommand=cmd(zoomtowidth,SCREEN_WIDTH;zoomtoheight,30;horizalign,left;vertalign,top;y,SCREEN_TOP;diffuse,color("0,0,0,0")); InitCommand=function(self)
OnCommand=cmd(finishtweening;diffusealpha,0.85;); self:zoomtowidth(SCREEN_WIDTH);
OffCommand=cmd(sleep,3;linear,0.5;diffusealpha,0;); self:zoomtoheight(30);
self:horizalign(left);
self:vertalign(top);
self:y(SCREEN_TOP);
self:diffuse(color("0,0,0,0"));
end;
OnCommand=function(self)
self:finishtweening();
self:diffusealpha(0.85);
end;
OffCommand=function(self)
self:sleep(3);
self:linear(0.5);
self:diffusealpha(0);
end;
}; };
LoadFont("Common","Normal") .. { LoadFont("Common","Normal") .. {
Name="Text"; Name="Text";
InitCommand=cmd(maxwidth,750;horizalign,left;vertalign,top;y,SCREEN_TOP+10;x,SCREEN_LEFT+10;shadowlength,1;diffusealpha,0;); InitCommand=function(self)
OnCommand=cmd(finishtweening;diffusealpha,1;zoom,0.5); self:maxwidth(750);
OffCommand=cmd(sleep,3;linear,0.5;diffusealpha,0;); self:horizalign(left);
self:vertalign(top);
self:y(SCREEN_TOP + 10);
self:x(SCREEN_LEFT + 10);
self:shadowlength(1);
self:diffusealpha(0);
end;
OnCommand=function(self)
self:finishtweening();
self:diffusealpha(1);
self:zoom(0.5);
end;
OffCommand=function(self)
self:sleep(3);
self:linear(0.5);
self:diffusealpha(0);
end;
}; };
SystemMessageMessageCommand = function(self, params) SystemMessageMessageCommand = function(self, params)
self:GetChild("Text"):settext( params.Message ); self:GetChild("Text"):settext( params.Message );
@@ -84,7 +81,9 @@ t[#t+1] = Def.ActorFrame {
end end
self:playcommand( "Off" ); self:playcommand( "Off" );
end; end;
HideSystemMessageMessageCommand = cmd(finishtweening); HideSystemMessageMessageCommand = function(self)
self:finishtweening();
end;
}; };
return t; return t;
@@ -1,14 +1,22 @@
return Def.ActorFrame { return Def.ActorFrame {
--Def.ControllerStateDisplay {
-- InitCommand=cmd(LoadGameController,
--};
Def.DeviceList { Def.DeviceList {
Font="Common normal"; Font="Common normal";
InitCommand=cmd(x,SCREEN_LEFT+20;y,SCREEN_TOP+80;zoom,0.8;halign,0); InitCommand=function(self)
self:x(SCREEN_LEFT + 20);
self:y(SCREEN_TOP + 80);
self:zoom(0.8);
self:halign(0);
end;
}; };
Def.InputList { Def.InputList {
Font="Common normal"; Font="Common normal";
InitCommand=cmd(x,SCREEN_CENTER_X-250;y,SCREEN_CENTER_Y;zoom,1;halign,0;vertspacing,8); InitCommand=function(self)
self:x(SCREEN_CENTER_X - 250);
self:y(SCREEN_CENTER_Y);
self:zoom(1);
self:halign(0);
self:vertspacing(8);
end;
}; };
}; };
@@ -6,7 +6,27 @@ local FullFile = THEME:GetPathB('','_frame files 3x1/'..File )
local Frame = LoadActor( FullFile ) local Frame = LoadActor( FullFile )
return Def.ActorFrame { return Def.ActorFrame {
Frame .. { InitCommand=cmd(setstate,0;pause;horizalign,right;x,-Width/2) }; Frame .. {
Frame .. { InitCommand=cmd(setstate,1;pause;zoomtowidth,Width) }; InitCommand=function(self)
Frame .. { InitCommand=cmd(setstate,2;pause;horizalign,left;x,Width/2) }; self:setstate(0);
self:pause();
self:horizalign(right);
self:x(-Width / 2);
end;
};
Frame .. {
InitCommand=function(self)
self:setstate(1);
self:pause();
self:zoomtowidth(Width);
end;
};
Frame .. {
InitCommand=function(self)
self:setstate(2);
self:pause();
self:horizalign(left);
self:x(Width / 2);
end;
};
}; };
@@ -6,13 +6,90 @@ assert( Height );
local FullFile = THEME:GetPathB('','_frame files 3x3/'..File ) local FullFile = THEME:GetPathB('','_frame files 3x3/'..File )
local Frame = LoadActor( FullFile ) local Frame = LoadActor( FullFile )
return Def.ActorFrame { return Def.ActorFrame {
Frame .. { InitCommand=cmd(setstate,0;pause;horizalign,right;vertalign,bottom;x,-Width/2;y,-Height/2) }; Frame .. {
Frame .. { InitCommand=cmd(setstate,1;pause;zoomtowidth,Width;vertalign,bottom;zoomtowidth,Width;y,-Height/2) }; InitCommand=function(self)
Frame .. { InitCommand=cmd(setstate,2;pause;horizalign,left;vertalign,bottom;x,Width/2;y,-Height/2) }; self:setstate(0);
Frame .. { InitCommand=cmd(setstate,3;pause;horizalign,right;x,-Width/2;zoomtoheight,Height) }; self:pause();
Frame .. { InitCommand=cmd(setstate,4;pause;zoomtowidth,Width;zoomtoheight,Height) }; self:horizalign(right);
Frame .. { InitCommand=cmd(setstate,5;pause;horizalign,left;x,Width/2;zoomtoheight,Height) }; self:vertalign(bottom);
Frame .. { InitCommand=cmd(setstate,6;pause;horizalign,right;vertalign,top;x,-Width/2;y,Height/2) }; self:x(-Width / 2);
Frame .. { InitCommand=cmd(setstate,7;pause;zoomtowidth,Width;vertalign,top;zoomtowidth,Width;y,Height/2) }; self:y(-Height / 2);
Frame .. { InitCommand=cmd(setstate,8;pause;horizalign,left;vertalign,top;x,Width/2;y,Height/2) }; end;
};
Frame .. {
InitCommand=function(self)
self:setstate(1);
self:pause();
self:zoomtowidth(Width);
self:vertalign(bottom);
self:zoomtowidth(Width);
self:y(-Height / 2);
end;
};
Frame .. {
InitCommand=function(self)
self:setstate(2);
self:pause();
self:horizalign(left);
self:vertalign(bottom);
self:x(Width / 2);
self:y(-Height / 2);
end;
};
Frame .. {
InitCommand=function(self)
self:setstate(3);
self:pause();
self:horizalign(right);
self:x(-Width / 2);
self:zoomtoheight(Height);
end;
};
Frame .. {
InitCommand=function(self)
self:setstate(4);
self:pause();
self:zoomtowidth(Width);
self:zoomtoheight(Height);
end;
};
Frame .. {
InitCommand=function(self)
self:setstate(5);
self:pause();
self:horizalign(left);
self:x(Width / 2);
self:zoomtoheight(Height);
end;
};
Frame .. {
InitCommand=function(self)
self:setstate(6);
self:pause();
self:horizalign(right);
self:vertalign(top);
self:x(-Width / 2);
self:y(Height / 2);
end;
};
Frame .. {
InitCommand=function(self)
self:setstate(7);
self:pause();
self:zoomtowidth(Width);
self:vertalign(top);
self:zoomtowidth(Width);
self:y(Height / 2);
end;
};
Frame .. {
InitCommand=function(self)
self:setstate(8);
self:pause();
self:horizalign(left);
self:vertalign(top);
self:x(Width / 2);
self:y(Height / 2);
end;
};
}; };
+1 -1
View File
@@ -3,4 +3,4 @@ local waitTime = ...
-- default to 1 second if parameter is missing -- default to 1 second if parameter is missing
if not waitTime then waitTime = 1 end if not waitTime then waitTime = 1 end
return Def.Actor{ OnCommand=cmd(sleep,waitTime); }; return Def.Actor{ OnCommand=function(self) self:sleep(waitTime); end; };
@@ -1,3 +1,6 @@
return Def.Quad{ return Def.Quad{
InitCommand=cmd(zoomto,4,22;diffuse,color("#AABBDD")); InitCommand=function(self)
self:zoomto(4, 22);
self:diffuse(color("#AABBDD"));
end;
}; };
+10 -2
View File
@@ -1,8 +1,16 @@
return Def.ActorFrame { return Def.ActorFrame {
Def.Quad { Def.Quad {
InitCommand=cmd(zoomto,10,10;y,-5;skewx,-1); InitCommand=function(self)
self:zoomto(10, 10);
self:y(-5);
self:skewx(-1);
end;
}; };
Def.Quad { Def.Quad {
InitCommand=cmd(zoomto,10,10;y,5;skewx,1); InitCommand=function(self)
self:zoomto(10, 10);
self:y(5);
self:skewx(1);
end;
}; };
} }
+10 -2
View File
@@ -1,8 +1,16 @@
return Def.ActorFrame { return Def.ActorFrame {
Def.Quad { Def.Quad {
InitCommand=cmd(zoomto,10,10;y,-5;skewx,1); InitCommand=function(self)
self:zoomto(10, 10);
self:y(-5);
self:skewx(1);
end;
}; };
Def.Quad { Def.Quad {
InitCommand=cmd(zoomto,10,10;y,5;skewx,-1); InitCommand=function(self)
self:zoomto(10, 10);
self:y(5);
self:skewx(-1);
end;
}; };
} }
@@ -12,7 +12,9 @@ local LabelMinZoom = THEME:GetMetric("Combo", "LabelMinZoom");
local LabelMaxZoom = THEME:GetMetric("Combo", "LabelMaxZoom"); local LabelMaxZoom = THEME:GetMetric("Combo", "LabelMaxZoom");
local t = Def.ActorFrame { local t = Def.ActorFrame {
InitCommand=cmd(vertalign,bottom); InitCommand=function(self)
self:vertalign(bottom);
end;
LoadFont( "Combo", "numbers" ) .. { LoadFont( "Combo", "numbers" ) .. {
Name="Number"; Name="Number";
OnCommand = THEME:GetMetric("Combo", "NumberOnCommand"); OnCommand = THEME:GetMetric("Combo", "NumberOnCommand");
@@ -39,11 +41,14 @@ local t = Def.ActorFrame {
return return
end; --]] end; --]]
TwentyFiveMilestoneCommand=function(self,parent) TwentyFiveMilestoneCommand=function(self,parent)
(cmd(skewy,-0.125;decelerate,0.325;skewy,0))(self); self:skewy(-0.125);
self:decelerate(0.325);
self:skewy(0);
end; end;
ToastyAchievedMessageCommand=function(self,params) ToastyAchievedMessageCommand=function(self,params)
if params.PlayerNumber == player then if params.PlayerNumber == player then
(cmd(thump,2;effectclock,'beat'))(self); self:thump(2);
self:effectclock('beat');
end; end;
end; end;
ComboCommand=function(self, param) ComboCommand=function(self, param)
@@ -88,26 +93,19 @@ local t = Def.ActorFrame {
c.Number:diffuse(Color("White")); c.Number:diffuse(Color("White"));
-- c.Number:diffuse(PlayerColor(player)); -- c.Number:diffuse(PlayerColor(player));
c.Number:stopeffect(); c.Number:stopeffect();
(cmd(diffuse,Color("White");diffusebottomedge,color("0.5,0.5,0.5,1")))(c.Label); c.Label.diffuse(Color("White"));
c.Label.diffusebottomedge(color("0.5,0.5,0.5,1"));
else else
c.Number:diffuse(color("#ff0000")); c.Number:diffuse(color("#ff0000"));
c.Number:stopeffect(); c.Number:stopeffect();
(cmd(diffuse,Color("Red");diffusebottomedge,color("0.5,0,0,1")))(c.Label); c.Label.diffuse(Color("Red"));
c.Label.diffusebottomedge(color("0.5,0,0,1"));
end end
-- Pulse -- Pulse
Pulse( c.Number, param ); Pulse( c.Number, param );
PulseLabel( c.Label, param ); PulseLabel( c.Label, param );
-- Milestone Logic -- Milestone Logic
end; end;
--[[ ScoreChangedMessageCommand=function(self,param)
local iToastyCombo = param.ToastyCombo;
if iToastyCombo and (iToastyCombo > 0) then
-- (cmd(thump;effectmagnitude,1,1.2,1;effectclock,'beat'))(c.Number)
-- (cmd(thump;effectmagnitude,1,1.2,1;effectclock,'beat'))(c.Number)
else
-- c.Number:stopeffect();
end;
end; --]]
}; };
return t; return t;
@@ -31,16 +31,29 @@ local t = Def.ActorFrame {};
t[#t+1] = Def.ActorFrame { t[#t+1] = Def.ActorFrame {
LoadActor(THEME:GetPathG("Judgment","Normal")) .. { LoadActor(THEME:GetPathG("Judgment","Normal")) .. {
Name="Judgment"; Name="Judgment";
InitCommand=cmd(pause;visible,false); InitCommand=function(self)
self:pause();
self:visible(false);
end;
OnCommand=THEME:GetMetric("Judgment","JudgmentOnCommand"); OnCommand=THEME:GetMetric("Judgment","JudgmentOnCommand");
ResetCommand=cmd(finishtweening;stopeffect;visible,false); ResetCommand=function(self)
self:finishtweening();
self:stopeffect();
self:visible(false);
end;
}; };
LoadFont("Common Normal") .. { LoadFont("Common Normal") .. {
Name="ProtimingDisplay"; Name="ProtimingDisplay";
Text=""; Text="";
InitCommand=cmd(visible,false); InitCommand=function(self)
self:visible(false);
end;
OnCommand=THEME:GetMetric("Protiming","ProtimingOnCommand"); OnCommand=THEME:GetMetric("Protiming","ProtimingOnCommand");
ResetCommand=cmd(finishtweening;stopeffect;visible,false); ResetCommand=function(self)
self:finishtweening();
self:stopeffect();
self:visible(false);
end;
}; };
InitCommand = function(self) InitCommand = function(self)
@@ -1,10 +1,32 @@
return LoadFont("Common Normal") .. { return LoadFont("Common Normal") .. {
Text="Exit"; Text="Exit";
InitCommand=cmd(x,SCREEN_CENTER_X;zoom,0.75;shadowlength,0;diffuse,color("#808080")); InitCommand=function(self)
OnCommand=cmd(diffusealpha,0;decelerate,0.5;diffusealpha,1); self:x(SCREEN_CENTER_X);
OffCommand=cmd(stoptweening;accelerate,0.3;diffusealpha,0;queuecommand,"Hide"); self:zoom(0.75);
HideCommand=cmd(visible,false); self:shadowlength(0);
self:diffuse(color("#808080"));
end;
OnCommand=function(self)
self:diffusealpha(0);
self:decelerate(0.5);
self:diffusealpha(1);
end;
OffCommand=function(self)
self:stoptweening();
self:accelerate(0.3);
self:diffusealpha(0);
self:queuecommand("Hide");
end;
HideCommand=function(self)
self:visible(false);
end;
GainFocusCommand=cmd(diffuseshift;effectcolor2,color("#808080");effectcolor1,color("#FFFFFF")); GainFocusCommand=function(self)
LoseFocusCommand=cmd(stopeffect); self:diffuseshift();
self:effectcolor2(color("#808080"));
self:effectcolor1(color("#FFFFFF"));
end;
LoseFocusCommand=function(self)
self:stopeffect();
end;
}; };
@@ -1,3 +1,6 @@
return Def.Quad{ return Def.Quad{
InitCommand=cmd(setsize,96,28;diffuse,color("#44CCFFCC");); InitCommand=function(self)
self:setsize(96, 28);
self:diffuse(color("#44CCFFCC"));
end;
}; };
@@ -6,6 +6,10 @@ t[#t+1] = LoadFont("Common Normal") .. {
Text=gc:GetName(); Text=gc:GetName();
}; };
t.GainFocusCommand=cmd(visible,true); t.GainFocusCommand=function(self)
t.LoseFocusCommand=cmd(visible,false); self:visible(true);
end;
t.LoseFocusCommand=function(self)
self:visible(false);
end;
return t; return t;
@@ -2,7 +2,9 @@ local t = Def.ActorFrame {};
t[#t+1] = Def.ActorFrame { t[#t+1] = Def.ActorFrame {
Def.Quad { Def.Quad {
InitCommand=cmd(zoomto,32,32); InitCommand=function(self)
self:zoomto(32, 32);
end;
}; };
}; };
@@ -6,7 +6,27 @@ local FullFile = THEME:GetPathG('','_frame files 3x1/'..File )
local Frame = LoadActor( FullFile ) local Frame = LoadActor( FullFile )
return Def.ActorFrame { return Def.ActorFrame {
Frame .. { InitCommand=cmd(setstate,0;pause;horizalign,right;x,-Width/2) }; Frame .. {
Frame .. { InitCommand=cmd(setstate,1;pause;zoomtowidth,Width) }; InitCommand=function(self)
Frame .. { InitCommand=cmd(setstate,2;pause;horizalign,left;x,Width/2) }; self:setstate(0);
self:pause();
self:horizalign(right);
self:x(-Width / 2);
end;
};
Frame .. {
InitCommand=function(self)
self:setstate(1);
self:pause();
self:zoomtowidth(Width);
end;
};
Frame .. {
InitCommand=function(self)
self:setstate(2);
self:pause();
self:horizalign(left);
self:x(Width / 2);
end;
};
}; };
@@ -6,13 +6,90 @@ assert( Height );
local FullFile = THEME:GetPathG('','_frame files 3x3/'..File ) local FullFile = THEME:GetPathG('','_frame files 3x3/'..File )
local Frame = LoadActor( FullFile ) local Frame = LoadActor( FullFile )
return Def.ActorFrame { return Def.ActorFrame {
Frame .. { InitCommand=cmd(setstate,0;pause;horizalign,right;vertalign,bottom;x,-Width/2;y,-Height/2) }; Frame .. {
Frame .. { InitCommand=cmd(setstate,1;pause;zoomtowidth,Width;vertalign,bottom;zoomtowidth,Width;y,-Height/2) }; InitCommand=function(self)
Frame .. { InitCommand=cmd(setstate,2;pause;horizalign,left;vertalign,bottom;x,Width/2;y,-Height/2) }; self:setstate(0);
Frame .. { InitCommand=cmd(setstate,3;pause;horizalign,right;x,-Width/2;zoomtoheight,Height) }; self:pause();
Frame .. { InitCommand=cmd(setstate,4;pause;zoomtowidth,Width;zoomtoheight,Height) }; self:horizalign(right);
Frame .. { InitCommand=cmd(setstate,5;pause;horizalign,left;x,Width/2;zoomtoheight,Height) }; self:vertalign(bottom);
Frame .. { InitCommand=cmd(setstate,6;pause;horizalign,right;vertalign,top;x,-Width/2;y,Height/2) }; self:x(-Width / 2);
Frame .. { InitCommand=cmd(setstate,7;pause;zoomtowidth,Width;vertalign,top;zoomtowidth,Width;y,Height/2) }; self:y(-Height / 2);
Frame .. { InitCommand=cmd(setstate,8;pause;horizalign,left;vertalign,top;x,Width/2;y,Height/2) }; end;
};
Frame .. {
InitCommand=function(self)
self:setstate(1);
self:pause();
self:zoomtowidth(Width);
self:vertalign(bottom);
self:zoomtowidth(Width);
self:y(-Height / 2);
end;
};
Frame .. {
InitCommand=function(self)
self:setstate(2);
self:pause();
self:horizalign(left);
self:vertalign(bottom);
self:x(Width / 2);
self:y(-Height / 2);
end;
};
Frame .. {
InitCommand=function(self)
self:setstate(3);
self:pause();
self:horizalign(right);
self:x(-Width / 2);
self:zoomtoheight(Height);
end;
};
Frame .. {
InitCommand=function(self)
self:setstate(4);
self:pause();
self:zoomtowidth(Width);
self:zoomtoheight(Height);
end;
};
Frame .. {
InitCommand=function(self)
self:setstate(5);
self:pause();
self:horizalign(left);
self:x(Width / 2);
self:zoomtoheight(Height);
end;
};
Frame .. {
InitCommand=function(self)
self:setstate(6);
self:pause();
self:horizalign(right);
self:vertalign(top);
self:x(-Width / 2);
self:y(Height / 2);
end;
};
Frame .. {
InitCommand=function(self)
self:setstate(7);
self:pause();
self:zoomtowidth(Width);
self:vertalign(top);
self:zoomtowidth(Width);
self:y(Height / 2);
end;
};
Frame .. {
InitCommand=function(self)
self:setstate(8);
self:pause();
self:horizalign(left);
self:vertalign(top);
self:x(Width / 2);
self:y(Height / 2);
end;
};
}; };
+8 -2
View File
@@ -22,8 +22,14 @@ end
function LoadSongBackground() function LoadSongBackground()
return Def.Sprite { return Def.Sprite {
InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y), InitCommand=function(self)
BeginCommand=cmd(LoadFromSongBackground,GAMESTATE:GetCurrentSong();scale_or_crop_background) self:x(SCREEN_CENTER_X);
self:y(SCREEN_CENTER_Y);
end;
BeginCommand=function(self)
self:LoadFromSongBackground(GAMESTATE:GetCurrentSong());
self:scale_or_crop_background();
end;
} }
end end
+11 -2
View File
@@ -23,8 +23,17 @@ Library = {
local t = Def.ActorFrame { local t = Def.ActorFrame {
Name="Radar"; Name="Radar";
Def.GrooveRadar { Def.GrooveRadar {
OnCommand=cmd(zoom,0;sleep,0.583;decelerate,0.150;zoom,1); OnCommand=function(self)
OffCommand=cmd(sleep,0.183;decelerate,0.167;zoom,0); self:zoom(0);
self:sleep(0.583);
self:decelerate(0.150);
self:zoom(1);
end;
OffCommand=function(self)
self:sleep(0.183);
self:decelerate(0.167);
self:zoom(0);
end;
CurrentSongChangedMessageCommand=function(self) CurrentSongChangedMessageCommand=function(self)
for pn in ivalues(GAMESTATE:GetHumanPlayers()) do for pn in ivalues(GAMESTATE:GetHumanPlayers()) do
radarSet(self, pn); radarSet(self, pn);