DONE! All lua is future-proofed.

This commit is contained in:
Jason Felds
2013-07-05 22:17:42 -04:00
parent 0259af5c80
commit afd0dac0c1
44 changed files with 3017 additions and 1495 deletions
@@ -184,8 +184,15 @@ for pn in ivalues(PlayerNumber) do
ActorUtil.LoadAllCommandsAndSetXY(self,Var "LoadingScreen"); ActorUtil.LoadAllCommandsAndSetXY(self,Var "LoadingScreen");
end; end;
Def.Quad { Def.Quad {
InitCommand=cmd(zoomto,420,20); InitCommand=function(self)
OnCommand=cmd(fadeleft,0.35;faderight,0.35;diffuse,Color.Black;diffusealpha,0.5); self:zoomto(420, 20);
end;
OnCommand=function(self)
self:fadeleft(0.35);
self:faderight(0.35);
self:diffuse(Color.Black);
self:diffusealpha(0.5);
end;
}; };
LoadActor( THEME:GetPathG( 'SongMeterDisplay', 'frame ' .. PlayerNumberToString(pn) ) ) .. { LoadActor( THEME:GetPathG( 'SongMeterDisplay', 'frame ' .. PlayerNumberToString(pn) ) ) .. {
InitCommand=function(self) InitCommand=function(self)
@@ -194,23 +201,49 @@ for pn in ivalues(PlayerNumber) do
end; end;
}; };
Def.Quad { Def.Quad {
InitCommand=cmd(zoomto,2,8); InitCommand=function(self)
OnCommand=cmd(x,songMeterScale(0.25);diffuse,PlayerColor(pn);diffusealpha,0.5); self:zoomto(2,8);
end;
OnCommand=function(self)
self:x(songMeterScale(0.25));
self:diffuse(PlayerColor(pn));
self:diffusealpha(0.5);
end;
}; };
Def.Quad { Def.Quad {
InitCommand=cmd(zoomto,2,8); InitCommand=function(self)
OnCommand=cmd(x,songMeterScale(0.5);diffuse,PlayerColor(pn);diffusealpha,0.5); self:zoomto(2,8);
end;
OnCommand=function(self)
self:x(songMeterScale(0.5));
self:diffuse(PlayerColor(pn));
self:diffusealpha(0.5);
end;
}; };
Def.Quad { Def.Quad {
InitCommand=cmd(zoomto,2,8); InitCommand=function(self)
OnCommand=cmd(x,songMeterScale(0.75);diffuse,PlayerColor(pn);diffusealpha,0.5); self:zoomto(2,8);
end;
OnCommand=function(self)
self:x(songMeterScale(0.75));
self:diffuse(PlayerColor(pn));
self:diffusealpha(0.5);
end;
}; };
Def.SongMeterDisplay { Def.SongMeterDisplay {
StreamWidth=THEME:GetMetric( MetricsName, 'StreamWidth' ); StreamWidth=THEME:GetMetric( MetricsName, 'StreamWidth' );
Stream=LoadActor( THEME:GetPathG( 'SongMeterDisplay', 'stream ' .. PlayerNumberToString(pn) ) )..{ Stream=LoadActor( THEME:GetPathG( 'SongMeterDisplay', 'stream ' .. PlayerNumberToString(pn) ) )..{
InitCommand=cmd(diffuse,PlayerColor(pn);diffusealpha,0.5;blend,Blend.Add;); InitCommand=function(self)
self:diffuse(PlayerColor(pn));
self:diffusealpha(0.5);
self:blend(Blend.Add);
end;
};
Tip=LoadActor( THEME:GetPathG( 'SongMeterDisplay', 'tip ' .. PlayerNumberToString(pn) ) ) .. {
InitCommand=function(self)
self:visible(false);
end;
}; };
Tip=LoadActor( THEME:GetPathG( 'SongMeterDisplay', 'tip ' .. PlayerNumberToString(pn) ) ) .. { InitCommand=cmd(visible,false); };
}; };
}; };
if ThemePrefs.Get("TimingDisplay") == true then if ThemePrefs.Get("TimingDisplay") == true then
@@ -4,27 +4,72 @@ local t = Def.ActorFrame{};
if longFail then if longFail then
t[#t+1] = Def.Quad{ t[#t+1] = Def.Quad{
InitCommand=cmd(FullScreen;diffuse,color("1,0,0,0");blend,Blend.Multiply); InitCommand=function(self)
OnCommand=cmd(decelerate,1.25;diffuse,color("0.75,0,0,0.75");linear,7;diffuse,color("0,0,0,1");sleep,1.25;linear,1;diffuse,color("1,0,0,1");decelerate,2;diffuse,color("0,0,0,1")); self:FullScreen();
self:diffuse(color("1,0,0,0"));
self:blend(Blend.Multiply);
end;
OnCommand=function(self)
self:decelerate(1.25);
self:diffuse(color("0.75,0,0,0.75"));
self:linear(7);
self:diffuse(color("0,0,0,1"));
self:sleep(1.25);
self:linear(1);
self:diffuse(color("1,0,0,1"));
self:decelerate(2);
self:diffuse(color("0,0,0,1"));
end;
}; };
t[#t+1] = Def.Quad{ t[#t+1] = Def.Quad{
InitCommand=cmd(FullScreen;diffuse,color("1,1,1,1");diffusealpha,0); InitCommand=function(self)
OnCommand=cmd(finishtweening;diffusealpha,1;decelerate,1.25;diffuse,color("1,0,0,0")); self:FullScreen();
self:diffuse(color("1,1,1,1"));
self:diffusealpha(0);
end;
OnCommand=function(self)
self:finishtweening();
self:diffusealpha(1);
self:decelerate(1.25);
self:diffuse(color("1,0,0,0"));
end;
}; };
t[#t+1] = LoadActor(THEME:GetPathS( "ScreenGameplayAlternate", "failed" ) ) .. { t[#t+1] = LoadActor(THEME:GetPathS( "ScreenGameplayAlternate", "failed" ) ) .. {
StartTransitioningCommand=cmd(play); StartTransitioningCommand=function(self)
self:play();
end;
}; };
else else
t[#t+1] = Def.Quad{ t[#t+1] = Def.Quad{
InitCommand=cmd(FullScreen;diffuse,color("1,0,0,0");blend,Blend.Multiply); InitCommand=function(self)
OnCommand=cmd(smooth,1;diffuse,color("0.75,0,0,0.75");decelerate,2;diffuse,color("0,0,0,1")); self:FullScreen();
self:diffuse(color("1,0,0,0"));
self:blend(Blend.Multiply);
end;
OnCommand=function(self)
self:smooth(1);
self:diffuse(color("0.75,0,0,0.75"));
self:decelerate(2);
self:diffuse(color("0,0,0,1"));
end;
}; };
t[#t+1] = Def.Quad{ t[#t+1] = Def.Quad{
InitCommand=cmd(FullScreen;diffuse,color("1,1,1,1");diffusealpha,0); InitCommand=function(self)
OnCommand=cmd(finishtweening;diffusealpha,1;decelerate,1.25;diffuse,color("1,0,0,0")); self:FullScreen();
self:diffuse(color("1,1,1,1"));
self:diffusealpha(0);
end;
OnCommand=function(self)
self:finishtweening();
self:diffusealpha(1);
self:decelerate(1.25);
self:diffuse(color("1,0,0,0"));
end;
}; };
t[#t+1] = LoadActor(THEME:GetPathS( Var "LoadingScreen", "failed" ) ) .. { t[#t+1] = LoadActor(THEME:GetPathS( Var "LoadingScreen", "failed" ) ) .. {
StartTransitioningCommand=cmd(play); StartTransitioningCommand=function(self)
self:play();
end;
}; };
end; end;
@@ -3,36 +3,79 @@ local t = Def.ActorFrame{};
if not GAMESTATE:IsCourseMode() then return t; end; if not GAMESTATE:IsCourseMode() then return t; end;
t[#t+1] = Def.Sprite { t[#t+1] = Def.Sprite {
InitCommand=cmd(Center); InitCommand=function(self)
self:Center();
end;
BeforeLoadingNextCourseSongMessageCommand=function(self) self:LoadFromSongBackground( SCREENMAN:GetTopScreen():GetNextCourseSong() ) end; BeforeLoadingNextCourseSongMessageCommand=function(self) self:LoadFromSongBackground( SCREENMAN:GetTopScreen():GetNextCourseSong() ) end;
ChangeCourseSongInMessageCommand=cmd(scale_or_crop_background); ChangeCourseSongInMessageCommand=function(self)
StartCommand=cmd(diffusealpha,0;decelerate,0.5;diffusealpha,1;); self:scale_or_crop_background();
FinishCommand=cmd(linear,0.1;glow,Color.Alpha(Color("White"),0.5);decelerate,0.4;glow,Color("Invisible");diffusealpha,0); end;
StartCommand=function(self)
self:diffusealpha(0);
self:decelerate(0.5);
self:diffusealpha(1);
end;
FinishCommand=function(self)
self:linear(0.1);
self:glow(Color.Alpha(Color("White"),0.5));
self:decelerate(0.4);
self:glow(Color("Invisible"));
self:diffusealpha(0);
end;
}; };
t[#t+1] = Def.ActorFrame { t[#t+1] = Def.ActorFrame {
InitCommand=cmd(Center); InitCommand=function(self)
OnCommand=cmd(stoptweening;addx,30;linear,3;addx,-30); self:Center();
end;
OnCommand=function(self)
self:stoptweening();
self:addx(30);
self:linear(3);
self:addx(-30);
end;
LoadFont("Common Normal") .. { LoadFont("Common Normal") .. {
InitCommand=cmd(strokecolor,Color("Outline");y,-10); InitCommand=function(self)
self:strokecolor(Color("Outline"));
self:y(-10);
end;
BeforeLoadingNextCourseSongMessageCommand=function(self) BeforeLoadingNextCourseSongMessageCommand=function(self)
local NextSong = SCREENMAN:GetTopScreen():GetNextCourseSong(); local NextSong = SCREENMAN:GetTopScreen():GetNextCourseSong();
self:settext( NextSong:GetDisplayFullTitle() ); self:settext( NextSong:GetDisplayFullTitle() );
end; end;
StartCommand=cmd(faderight,1;diffusealpha,0;linear,0.5;faderight,0;diffusealpha,1;sleep,1.5;linear,0.5;diffusealpha,0); StartCommand=function(self)
self:faderight(1);
self:diffusealpha(0);
self:linear(0.5);
self:faderight(0);
self:diffusealpha(1);
self:sleep(1.5);
self:linear(0.5);
self:diffusealpha(0);
end;
}; };
--[[ LoadFont("Common Normal") .. {
Text=GAMESTATE:IsCourseMode() and GAMESTATE:GetCurrentCourse():GetCourseType() or GAMESTATE:GetCurrentSong():GetDisplayArtist();
InitCommand=cmd(strokecolor,Color("Outline");zoom,0.75);
OnCommand=cmd(faderight,1;diffusealpha,0;linear,0.5;faderight,0;diffusealpha,1;sleep,1.5;linear,0.5;diffusealpha,0);
}; --]]
LoadFont("Common Normal") .. { LoadFont("Common Normal") .. {
InitCommand=cmd(strokecolor,Color("Outline");diffuse,Color("Orange");diffusebottomedge,Color("Yellow");zoom,0.75;y,10); InitCommand=function(self)
self:strokecolor(Color("Outline"));
self:diffuse(Color("Orange"));
self:diffusebottomedge(Color("Yellow"));
self:zoom(0.75);
self:y(10);
end;
BeforeLoadingNextCourseSongMessageCommand=function(self) BeforeLoadingNextCourseSongMessageCommand=function(self)
local NextSong = SCREENMAN:GetTopScreen():GetNextCourseSong(); local NextSong = SCREENMAN:GetTopScreen():GetNextCourseSong();
self:settext( SecondsToMSSMsMs( NextSong:MusicLengthSeconds() ) ); self:settext( SecondsToMSSMsMs( NextSong:MusicLengthSeconds() ) );
end; end;
StartCommand=cmd(faderight,1;diffusealpha,0;linear,0.5;faderight,0;diffusealpha,1;sleep,1.5;linear,0.5;diffusealpha,0); StartCommand=function(self)
self:faderight(1);
self:diffusealpha(0);
self:linear(0.5);
self:faderight(0);
self:diffusealpha(1);
self:sleep(1.5);
self:linear(0.5);
self:diffusealpha(0);
end;
}; };
}; };
@@ -6,7 +6,10 @@ local bg = Def.ActorFrame{
self:FullScreen(); self:FullScreen();
self:diffuse(color("0,0,0,0")); self:diffuse(color("0,0,0,0"));
end; end;
OnCommand=cmd(linear,5;diffusealpha,1); OnCommand=function(self)
self:linear(5);
self:diffusealpha(1);
end;
}; };
Def.ActorFrame{ Def.ActorFrame{
@@ -34,18 +37,54 @@ local bg = Def.ActorFrame{
LoadActor(THEME:GetPathG("_rave result","P1"))..{ LoadActor(THEME:GetPathG("_rave result","P1"))..{
Name="P1Win"; Name="P1Win";
InitCommand=cmd(Center;cropbottom,1;fadebottom,1;); InitCommand=function(self)
OnCommand=cmd(sleep,2;linear,0.5;cropbottom,0;fadebottom,0;sleep,1.75;linear,0.25;diffusealpha,0); self:Center();
self:cropbottom(1);
self:fadebottom(1);
end;
OnCommand=function(self)
self:sleep(2);
self:linear(0.5);
self:cropbottom(0);
self:fadebottom(0);
self:sleep(1.75);
self:linear(0.25);
self:diffusealpha(0);
end;
}; };
LoadActor(THEME:GetPathG("_rave result","P2"))..{ LoadActor(THEME:GetPathG("_rave result","P2"))..{
Name="P2Win"; Name="P2Win";
InitCommand=cmd(Center;cropbottom,1;fadebottom,1;); InitCommand=function(self)
OnCommand=cmd(sleep,2;linear,0.5;cropbottom,0;fadebottom,0;sleep,1.75;linear,0.25;diffusealpha,0); self:Center();
self:cropbottom(1);
self:fadebottom(1);
end;
OnCommand=function(self)
self:sleep(2);
self:linear(0.5);
self:cropbottom(0);
self:fadebottom(0);
self:sleep(1.75);
self:linear(0.25);
self:diffusealpha(0);
end;
}; };
LoadActor(THEME:GetPathG("_rave result","draw"))..{ LoadActor(THEME:GetPathG("_rave result","draw"))..{
Name="Draw"; Name="Draw";
InitCommand=cmd(Center;cropbottom,1;fadebottom,1;); InitCommand=function(self)
OnCommand=cmd(sleep,2;linear,0.5;cropbottom,0;fadebottom,0;sleep,1.75;linear,0.25;diffusealpha,0); self:Center();
self:cropbottom(1);
self:fadebottom(1);
end;
OnCommand=function(self)
self:sleep(2);
self:linear(0.5);
self:cropbottom(0);
self:fadebottom(0);
self:sleep(1.75);
self:linear(0.25);
self:diffusealpha(0);
end;
}; };
}; };
}; };
@@ -1,75 +1,292 @@
return Def.ActorFrame { return Def.ActorFrame {
Def.ActorFrame { Def.ActorFrame {
OnCommand=cmd(x,SCREEN_CENTER_X-20); OnCommand=function(self)
self:x(SCREEN_CENTER_X-20);
end;
-- Initial glow around receptors -- Initial glow around receptors
LoadActor("tapglow") .. { LoadActor("tapglow") .. {
OnCommand=cmd(x,85;y,95;zoom,0.7;rotationz,90;diffuseshift;effectcolor1,1,0.93333,0.266666,0.4;effectcolor2,1,1,1,1;effectperiod,0.25;effectmagnitude,0,1,0;diffusealpha,0;sleep,6;linear,0;diffusealpha,1;sleep,1.7;linear,0;diffusealpha,0); OnCommand=function(self)
self:x(85);
self:y(95);
self:zoom(0.7);
self:rotationz(90);
self:diffuseshift();
self:effectcolor1(1, 0.93333, 0.266666, 0.4);
self:effectcolor2(1, 1, 1, 1);
self:effectperiod(0.25);
self:effectmagnitude(0, 1, 0);
self:diffusealpha(0);
self:sleep(6);
self:linear(0);
self:diffusealpha(1);
self:sleep(1.7);
self:linear(0);
self:diffusealpha(0);
end;
}; };
LoadActor("tapglow") .. { LoadActor("tapglow") .. {
OnCommand=cmd(x,275;y,95;zoom,0.7;rotationz,270;diffuseshift;effectcolor1,1,0.93333,0.266666,0.4;effectcolor2,1,1,1,1;effectperiod,0.25;effectmagnitude,0,1,0;diffusealpha,0;sleep,6;linear,0;diffusealpha,1;sleep,1.7;linear,0;diffusealpha,0); OnCommand=function(self)
self:x(275);
self:y(95);
self:zoom(0.7);
self:rotationz(270);
self:diffuseshift();
self:effectcolor1(1, 0.93333, 0.266666, 0.4);
self:effectcolor2(1, 1, 1, 1);
self:effectperiod(0.25);
self:effectmagnitude(0, 1, 0);
self:diffusealpha(0);
self:sleep(6);
self:linear(0);
self:diffusealpha(1);
self:sleep(1.7);
self:linear(0);
self:diffusealpha(0);
end;
}; };
LoadActor("tapglow") .. { LoadActor("tapglow") .. {
OnCommand=cmd(x,212;y,95;zoom,0.7;rotationz,180;diffuseshift;effectcolor1,1,0.93333,0.266666,0.4;effectcolor2,1,1,1,1;effectperiod,0.25;effectmagnitude,0,1,0;diffusealpha,0;sleep,6;linear,0;diffusealpha,1;sleep,1.7;linear,0;diffusealpha,0); OnCommand=function(self)
self:x(212);
self:y(95);
self:zoom(0.7);
self:rotationz(180);
self:diffuseshift();
self:effectcolor1(1, 0.93333, 0.266666, 0.4);
self:effectcolor2(1, 1, 1, 1);
self:effectperiod(0.25);
self:effectmagnitude(0, 1, 0);
self:diffusealpha(0);
self:sleep(6);
self:linear(0);
self:diffusealpha(1);
self:sleep(1.7);
self:linear(0);
self:diffusealpha(0);
end;
}; };
LoadActor("tapglow") .. { LoadActor("tapglow") .. {
OnCommand=cmd(x,148;y,95;zoom,0.7;diffuseshift;effectcolor1,1,0.93333,0.266666,0.4;effectcolor2,1,1,1,1;effectperiod,0.25;effectmagnitude,0,1,0;diffusealpha,0;sleep,6;linear,0;diffusealpha,1;sleep,1.7;linear,0;diffusealpha,0); OnCommand=function(self)
self:x(148);
self:y(95);
self:zoom(0.7);
self:diffuseshift();
self:effectcolor1(1, 0.93333, 0.266666, 0.4);
self:effectcolor2(1, 1, 1, 1);
self:effectperiod(0.25);
self:effectmagnitude(0, 1, 0);
self:diffusealpha(0);
self:sleep(6);
self:linear(0);
self:diffusealpha(1);
self:sleep(1.7);
self:linear(0);
self:diffusealpha(0);
end;
}; };
LoadActor("tapglow") .. { LoadActor("tapglow") .. {
OnCommand=cmd(x,148;y,95;zoom,0.7;diffuseshift;effectcolor1,1,0.93333,0.266666,0.4;effectcolor2,1,1,1,1;effectperiod,0.25;effectmagnitude,0,1,0;diffusealpha,0;sleep,9.7;linear,0;diffusealpha,1;sleep,1.7;linear,0;diffusealpha,0); OnCommand=function(self)
self:x(148);
self:y(95);
self:zoom(0.7);
self:diffuseshift();
self:effectcolor1(1, 0.93333, 0.266666, 0.4);
self:effectcolor2(1, 1, 1, 1);
self:effectperiod(0.25);
self:effectmagnitude(0, 1, 0);
self:diffusealpha(0);
self:sleep(9.7);
self:linear(0);
self:diffusealpha(1);
self:sleep(1.7);
self:linear(0);
self:diffusealpha(0);
end;
}; };
-- 2nd step UP -- 2nd step UP
LoadActor("tapglow") .. { LoadActor("tapglow") .. {
OnCommand=cmd(x,212;y,95;zoom,0.7;rotationz,180;diffuseshift;effectcolor1,1,0.93333,0.266666,0.4;effectcolor2,1,1,1,1;effectperiod,0.25;effectmagnitude,0,1,0;diffusealpha,0;sleep,12.7;linear,0;diffusealpha,1;sleep,1.7;linear,0;diffusealpha,0); OnCommand=function(self)
self:x(212);
self:y(95);
self:zoom(0.7);
self:rotationz(180);
self:diffuseshift();
self:effectcolor1(1, 0.93333, 0.266666, 0.4);
self:effectcolor2(1, 1, 1, 1);
self:effectperiod(0.25);
self:effectmagnitude(0, 1, 0);
self:diffusealpha(0);
self:sleep(12.7);
self:linear(0);
self:diffusealpha(1);
self:sleep(1.7);
self:linear(0);
self:diffusealpha(0);
end;
}; };
-- 3rd step UP -- 3rd step UP
LoadActor("tapglow") .. { LoadActor("tapglow") .. {
OnCommand=cmd(x,84;y,95;zoom,0.7;rotationz,90;diffuseshift;effectcolor1,1,0.93333,0.266666,0.4;effectcolor2,1,1,1,1;effectperiod,0.25;effectmagnitude,0,1,0;diffusealpha,0;sleep,15.7;linear,0;diffusealpha,1;sleep,1.7;linear,0;diffusealpha,0); OnCommand=function(self)
self:x(84);
self:y(95);
self:zoom(0.7);
self:rotationz(90);
self:diffuseshift();
self:effectcolor1(1, 0.93333, 0.266666, 0.4);
self:effectcolor2(1, 1, 1, 1);
self:effectperiod(0.25);
self:effectmagnitude(0, 1, 0);
self:diffusealpha(0);
self:sleep(15.7);
self:linear(0);
self:diffusealpha(1);
self:sleep(1.7);
self:linear(0);
self:diffusealpha(0);
end;
}; };
-- 4th step jump -- 4th step jump
LoadActor("tapglow") .. { LoadActor("tapglow") .. {
OnCommand=cmd(x,85;y,95;zoom,0.7;rotationz,90;diffuseshift;effectcolor1,1,0.93333,0.266666,0.4;effectcolor2,1,1,1,1;effectperiod,0.25;effectmagnitude,0,1,0;diffusealpha,0;sleep,18.7;linear,0;diffusealpha,1;sleep,1.7;linear,0;diffusealpha,0); OnCommand=function(self)
self:x(85);
self:y(95);
self:zoom(0.7);
self:rotationz(90);
self:diffuseshift();
self:effectcolor1(1, 0.93333, 0.266666, 0.4);
self:effectcolor2(1, 1, 1, 1);
self:effectperiod(0.25);
self:effectmagnitude(0, 1, 0);
self:diffusealpha(0);
self:sleep(18.7);
self:linear(0);
self:diffusealpha(1);
self:sleep(1.7);
self:linear(0);
self:diffusealpha(0);
end;
}; };
LoadActor("tapglow") .. { LoadActor("tapglow") .. {
OnCommand=cmd(x,275;y,95;zoom,0.7;rotationz,270;diffuseshift;effectcolor1,1,0.93333,0.266666,0.4;effectcolor2,1,1,1,1;effectperiod,0.25;effectmagnitude,0,1,0;diffusealpha,0;sleep,18.7;linear,0;diffusealpha,1;sleep,1.7;linear,0;diffusealpha,0); OnCommand=function(self)
self:x(275);
self:y(95);
self:zoom(0.7);
self:rotationz(270);
self:diffuseshift();
self:effectcolor1(1, 0.93333, 0.266666, 0.4);
self:effectcolor2(1, 1, 1, 1);
self:effectperiod(0.25);
self:effectmagnitude(0, 1, 0);
self:diffusealpha(0);
self:sleep(18.7);
self:linear(0);
self:diffusealpha(1);
self:sleep(1.7);
self:linear(0);
self:diffusealpha(0);
end;
}; };
-- miss step -- miss step
LoadActor("healthhilight") .. { LoadActor("healthhilight") .. {
OnCommand=cmd(x,180;y,40;diffuseshift;effectcolor1,1,0.93333,0.266666,0.4;effectcolor2,1,1,1,1;effectperiod,0.25;effectmagnitude,0,1,0;diffusealpha,0;sleep,22.7;linear,0;diffusealpha,1;sleep,1.7;linear,0;diffusealpha,0); OnCommand=function(self)
self:x(180);
self:y(40);
self:zoom(0.7);
self:diffuseshift();
self:effectcolor1(1, 0.93333, 0.266666, 0.4);
self:effectcolor2(1, 1, 1, 1);
self:effectperiod(0.25);
self:effectmagnitude(0, 1, 0);
self:diffusealpha(0);
self:sleep(22.7);
self:linear(0);
self:diffusealpha(1);
self:sleep(1.7);
self:linear(0);
self:diffusealpha(0);
end;
}; };
}; };
-- messages -- messages
LoadFont("Common Normal") .. { LoadFont("Common Normal") .. {
Text=ScreenString("How To Play StepMania"), Text=ScreenString("How To Play StepMania"),
InitCommand=cmd(zbuffer,1;z,20;x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;shadowlength,1;strokecolor,Color("Outline")); InitCommand=function(self)
OnCommand=cmd(diffusealpha,0;zoom,4;sleep,0.0;linear,0.3;diffusealpha,1;zoom,1;sleep,1.8;linear,0.3;zoom,0.75;x,170;y,60); self:zbuffer(1);
self:z(20);
self:x(SCREEN_CENTER_X);
self:y(SCREEN_CENTER_Y);
self:shadowlength(1);
self:strokecolor(Color("Outline"));
end;
OnCommand=function(self)
self:diffusealpha(0);
self:zoom(4);
self:sleep(0.0);
self:linear(0.3);
self:diffusealpha(1);
self:zoom(1);
self:sleep(1.8);
self:linear(0.3);
self:zoom(0.75);
self:x(170);
self:y(60);
end;
}; };
LoadActor("feet") .. { LoadActor("feet") .. {
OnCommand=cmd(z,20;x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;addx,-SCREEN_WIDTH;sleep,2.4;decelerate,0.3;addx,SCREEN_WIDTH;sleep,2;linear,0.3;zoomy,0); OnCommand=function(self)
self:z(20);
self:x(SCREEN_CENTER_X);
self:y(SCREEN_CENTER_Y);
self:addx(-SCREEN_WIDTH);
self:sleep(2.4);
self:decelerate(0.3);
self:addx(SCREEN_WIDTH);
self:sleep(2);
self:linear(0.3);
self:zoomy(0);
end;
}; };
LoadActor("_message tap")..{ LoadActor("_message tap")..{
OnCommand=cmd(sleep,6;queuecommand,"Show"); OnCommand=function(self)
self:sleep(6);
self:queuecommand("Show");
end;
}; };
LoadActor("_message tap")..{ LoadActor("_message tap")..{
OnCommand=cmd(sleep,9.7;queuecommand,"Show"); OnCommand=function(self)
self:sleep(9.7);
self:queuecommand("Show");
end;
}; };
LoadActor("_message tap")..{ LoadActor("_message tap")..{
OnCommand=cmd(sleep,12.7;queuecommand,"Show"); OnCommand=function(self)
self:sleep(12.7);
self:queuecommand("Show");
end;
}; };
LoadActor("_message tap")..{ LoadActor("_message tap")..{
OnCommand=cmd(sleep,15.7;queuecommand,"Show"); OnCommand=function(self)
self:sleep(15.7);
self:queuecommand("Show");
end;
}; };
LoadActor("_message jump")..{ LoadActor("_message jump")..{
OnCommand=cmd(sleep,18.7;queuecommand,"Show"); OnCommand=function(self)
self:sleep(18.7);
self:queuecommand("Show");
end;
}; };
LoadActor("_message miss")..{ LoadActor("_message miss")..{
OnCommand=cmd(sleep,22.7;queuecommand,"Show"); OnCommand=function(self)
self:sleep(22.7);
self:queuecommand("Show");
end;
}; };
}; };
@@ -1,7 +1,9 @@
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.Sprite { Def.Sprite {
Condition=not GAMESTATE:IsCourseMode(); Condition=not GAMESTATE:IsCourseMode();
OnCommand=function(self) OnCommand=function(self)
@@ -11,23 +13,29 @@ t[#t+1] = Def.ActorFrame {
self:LoadBackground(song:GetBackgroundPath()); self:LoadBackground(song:GetBackgroundPath());
end; end;
self:scale_or_crop_background(); self:scale_or_crop_background();
(cmd(fadebottom,0.25;fadetop,0.25;croptop,48/480;cropbottom,48/480))(self); self:fadebottom(0.25);
self:fadetop(0.25);
self:croptop(48/480);
self:cropbottom(48/480);
else else
self:visible(false); self:visible(false);
end end
end; end;
}; };
Def.Quad { Def.Quad {
InitCommand=cmd(scaletoclipped,SCREEN_WIDTH+1,SCREEN_HEIGHT); InitCommand=function(self)
OnCommand=cmd(diffuse,color("#FFCB05");diffusebottomedge,color("#F0BA00");diffusealpha,0.45); self:scaletoclipped(SCREEN_WIDTH + 1, SCREEN_HEIGHT);
end;
OnCommand=function(self)
self:diffuse(color("#FFCB05"));
self:diffusebottomedge(color("#F0BA00"));
self:diffusealpha(0.45);
end;
}; };
--[[ LoadActor(THEME:GetPathB("ScreenWithMenuElements","background/_grid")).. {
InitCommand=cmd(customtexturerect,0,0,(SCREEN_WIDTH+1)/4,SCREEN_HEIGHT/4;SetTextureFiltering,true);
OnCommand=cmd(zoomto,SCREEN_WIDTH+1,SCREEN_HEIGHT;diffuse,Color("Black");diffuseshift;effecttiming,(1/8)*4,0,(7/8)*4,0;effectclock,'beatnooffset';
effectcolor2,Color("Black");effectcolor1,Color.Alpha(Color("Black"),0.45);fadebottom,0.25;fadetop,0.25;croptop,48/480;cropbottom,48/480;diffusealpha,0.345);
}; --]]
LoadActor(THEME:GetPathB("ScreenWithMenuElements","background/_bg top")) .. { LoadActor(THEME:GetPathB("ScreenWithMenuElements","background/_bg top")) .. {
InitCommand=cmd(scaletoclipped,SCREEN_WIDTH+1,SCREEN_HEIGHT); InitCommand=function(self)
self:scaletoclipped(SCREEN_WIDTH + 1, SCREEN_HEIGHT);
end;
}; };
}; };
return t return t
@@ -6,33 +6,47 @@ local t = Def.ActorFrame {
LoadActor( THEME:GetPathB("Screen", "out") ); LoadActor( THEME:GetPathB("Screen", "out") );
LoadFont( "common normal" ) .. { LoadFont( "common normal" ) .. {
InitCommand=cmd(settext,"Press &START; for more options";x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y+100;visible,false); InitCommand=function(self)
AskForGoToOptionsCommand=cmd( self:settext("Press &START; for more options");
visible,true; self:x(SCREEN_CENTER_X);
diffusealpha,0; self:y(SCREEN_CENTER_Y + 100);
linear,0.15; self:visible(false);
zoomy,1; end;
diffusealpha,1; AskForGoToOptionsCommand=function(self)
sleep,1; self:visible(true);
linear,0.15; self:diffusealpha(0);
diffusealpha,0; self:linear(0.15);
zoomy,0; self:zoomy(1);
); self:diffusealpha(1);
GoToOptionsCommand=cmd(visible,false); self:sleep(1);
self:linear(0.15);
self:diffusealpha(0);
self:zoomy(0);
end;
GoToOptionsCommand=function(self)
self:visible(false);
end;
}; };
LoadFont( "common normal" ) .. { LoadFont( "common normal" ) .. {
InitCommand=cmd(settext,"entering options...";x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y+100;visible,false); InitCommand=function(self)
AskForGoToOptionsCommand=cmd( self:settext("entering options...");
visible,false; self:x(SCREEN_CENTER_X);
linear,0.15; self:y(SCREEN_CENTER_Y + 100);
zoomy,1; self:visible(false);
diffusealpha,1; end;
sleep,1; AskForGoToOptionsCommand=function(self)
linear,0.15; self:visible(false);
diffusealpha,0; self:linear(0.15);
zoomy,0; self:zoomy(1);
); self:diffusealpha(1);
GoToOptionsCommand=cmd(visible,true); self:sleep(1);
self:linear(0.15);
self:diffusealpha(0);
self:zoomy(0);
end;
GoToOptionsCommand=function(self)
self:visible(true);
end;
}; };
}; };
@@ -7,7 +7,9 @@ local function StepsDisplay(pn)
end end
local t = Def.StepsDisplay { local t = Def.StepsDisplay {
InitCommand=cmd(Load,"StepsDisplay",GAMESTATE:GetPlayerState(pn);); InitCommand=function(self)
self:Load("StepsDisplay", GAMESTATE:GetPlayerState(pn));
end;
}; };
if pn == PLAYER_1 then if pn == PLAYER_1 then
@@ -24,8 +26,13 @@ t[#t+1] = StandardDecorationFromFileOptional("AlternateHelpDisplay","AlternateHe
local function PercentScore(pn) local function PercentScore(pn)
local t = LoadFont("Common normal")..{ local t = LoadFont("Common normal")..{
InitCommand=cmd(zoom,0.625;shadowlength,1); InitCommand=function(self)
BeginCommand=cmd(playcommand,"Set"); self:zoom(0.625);
self:shadowlength(1);
end;
BeginCommand=function(self)
self:playcommand("Set");
end;
SetCommand=function(self) SetCommand=function(self)
local SongOrCourse, StepsOrTrail; local SongOrCourse, StepsOrTrail;
if GAMESTATE:IsCourseMode() then if GAMESTATE:IsCourseMode() then
@@ -72,16 +79,28 @@ local function PercentScore(pn)
end; end;
self:settext(text); self:settext(text);
end; end;
CurrentSongChangedMessageCommand=cmd(playcommand,"Set"); CurrentSongChangedMessageCommand=function(self)
CurrentCourseChangedMessageCommand=cmd(playcommand,"Set"); self:playcommand("Set");
end;
CurrentCourseChangedMessageCommand=function(self)
self:playcommand("Set");
end;
}; };
if pn == PLAYER_1 then if pn == PLAYER_1 then
t.CurrentStepsP1ChangedMessageCommand=cmd(playcommand,"Set"); t.CurrentStepsP1ChangedMessageCommand=function(self)
t.CurrentTrailP1ChangedMessageCommand=cmd(playcommand,"Set"); self:playcommand("Set");
end;
t.CurrentTrailP1ChangedMessageCommand=function(self)
self:playcommand("Set");
end;
else else
t.CurrentStepsP2ChangedMessageCommand=cmd(playcommand,"Set"); t.CurrentStepsP2ChangedMessageCommand=function(self)
t.CurrentTrailP2ChangedMessageCommand=cmd(playcommand,"Set"); self:playcommand("Set");
end;
t.CurrentTrailP2ChangedMessageCommand=function(self)
self:playcommand("Set");
end;
end end
return t; return t;
@@ -95,13 +114,16 @@ for pn in ivalues(PlayerNumber) do
PlayerJoinedMessageCommand=function(self, params) PlayerJoinedMessageCommand=function(self, params)
if params.Player == pn then if params.Player == pn then
self:visible(true); self:visible(true);
(cmd(zoom,0;bounceend,0.3;zoom,1))(self); self:zoom(0);
self:bounceend(0.3);
self:zoom(1);
end; end;
end; end;
PlayerUnjoinedMessageCommand=function(self, params) PlayerUnjoinedMessageCommand=function(self, params)
if params.Player == pn then if params.Player == pn then
self:visible(true); self:visible(true);
(cmd(bouncebegin,0.3;zoom,0))(self); self:bouncebegin(0.3);
self:zoom(0);
end; end;
end; end;
}; };
@@ -159,10 +181,18 @@ t[#t+1] = StandardDecorationFromFileOptional("SongTime","SongTime") .. {
end; end;
self:settext( SecondsToMSS(length) ); self:settext( SecondsToMSS(length) );
end; end;
CurrentSongChangedMessageCommand=cmd(playcommand,"Set"); CurrentSongChangedMessageCommand=function(self)
CurrentCourseChangedMessageCommand=cmd(playcommand,"Set"); self:playcommand("Set");
CurrentTrailP1ChangedMessageCommand=cmd(playcommand,"Set"); end;
CurrentTrailP2ChangedMessageCommand=cmd(playcommand,"Set"); CurrentCourseChangedMessageCommand=function(self)
self:playcommand("Set");
end;
CurrentTrailP1ChangedMessageCommand=function(self)
self:playcommand("Set");
end;
CurrentTrailP2ChangedMessageCommand=function(self)
self:playcommand("Set");
end;
} }
if not GAMESTATE:IsCourseMode() then if not GAMESTATE:IsCourseMode() then
@@ -198,20 +228,37 @@ if not GAMESTATE:IsCourseMode() then
end; end;
end; end;
t[#t+1] = Def.ActorFrame { t[#t+1] = Def.ActorFrame {
OnCommand=cmd(draworder,105;x,SCREEN_CENTER_X-76;y,SCREEN_CENTER_Y-72;zoomy,0;sleep,0.5;decelerate,0.25;zoomy,1;SetUpdateFunction,CDTitleUpdate); OnCommand=function(self)
OffCommand=cmd(bouncebegin,0.15;zoomx,0); self:draworder(105);
self:x(SCREEN_CENTER_X-76);
self:y(SCREEN_CENTER_Y-72);
self:zoomy(0);
self:sleep(0.5);
self:decelerate(0.25);
self:zoomy(1);
self:SetUpdateFunction(CDTitleUpdate);
end;
OffCommand=function(self)
self:bouncebegin(0.15);
self:zoomx(0);
end;
Def.Sprite { Def.Sprite {
Name="CDTitle"; Name="CDTitle";
InitCommand=cmd(y,19); InitCommand=function(self)
--OnCommand=cmd(draworder,106;shadowlength,1;zoom,0.75;diffusealpha,1;zoom,0;bounceend,0.35;zoom,0.75;spin;effectmagnitude,0,180,0); self:y(19);
end;
}; };
}; };
t[#t+1] = StandardDecorationFromFileOptional("NewSong","NewSong") .. { t[#t+1] = StandardDecorationFromFileOptional("NewSong","NewSong") .. {
-- ShowCommand=THEME:GetMetric(Var "LoadingScreen", "NewSongShowCommand" ); InitCommand=function(self)
-- HideCommand=THEME:GetMetric(Var "LoadingScreen", "NewSongHideCommand" ); self:playcommand("Set");
InitCommand=cmd(playcommand,"Set"); end;
BeginCommand=cmd(playcommand,"Set"); BeginCommand=function(self)
CurrentSongChangedMessageCommand=cmd(playcommand,"Set"); self:playcommand("Set");
end;
CurrentSongChangedMessageCommand=function(self)
self:playcommand("Set");
end;
SetCommand=function(self) SetCommand=function(self)
-- local pTargetProfile; -- local pTargetProfile;
local sSong; local sSong;
@@ -232,7 +279,9 @@ end;
if GAMESTATE:IsCourseMode() then if GAMESTATE:IsCourseMode() then
t[#t+1] = StandardDecorationFromFileOptional("NumCourseSongs","NumCourseSongs")..{ t[#t+1] = StandardDecorationFromFileOptional("NumCourseSongs","NumCourseSongs")..{
InitCommand=cmd(horizalign,right); InitCommand=function(self)
self:horizalign(right);
end;
SetCommand=function(self) SetCommand=function(self)
local curSelection= nil; local curSelection= nil;
local sAppend = ""; local sAppend = "";
@@ -249,23 +298,23 @@ if GAMESTATE:IsCourseMode() then
self:visible(false); self:visible(false);
end; end;
end; end;
CurrentCourseChangedMessageCommand=cmd(playcommand,"Set"); CurrentCourseChangedMessageCommand=function(self)
self:playcommand("Set");
end;
}; };
end end
t[#t+1] = StandardDecorationFromFileOptional("DifficultyDisplay","DifficultyDisplay"); t[#t+1] = StandardDecorationFromFileOptional("DifficultyDisplay","DifficultyDisplay");
t[#t+1] = StandardDecorationFromFileOptional("SortOrderFrame","SortOrderFrame") .. { t[#t+1] = StandardDecorationFromFileOptional("SortOrderFrame","SortOrderFrame") .. {
--[[ BeginCommand=cmd(playcommand,"Set");
SortOrderChangedMessageCommand=cmd(playcommand,"Set";);
SetCommand=function(self)
local s = SortOrderToLocalizedString( GAMESTATE:GetSortOrder() );
self:settext( s );
self:playcommand("Sort");
end; --]]
}; };
t[#t+1] = StandardDecorationFromFileOptional("SortOrder","SortOrderText") .. { t[#t+1] = StandardDecorationFromFileOptional("SortOrder","SortOrderText") .. {
BeginCommand=cmd(playcommand,"Set"); BeginCommand=function(self)
SortOrderChangedMessageCommand=cmd(playcommand,"Set";); self:playcommand("Set");
end;
SortOrderChangedMessageCommand=function(self)
self:playcommand("Set");
end;
SetCommand=function(self) SetCommand=function(self)
local s = SortOrderToLocalizedString( GAMESTATE:GetSortOrder() ); local s = SortOrderToLocalizedString( GAMESTATE:GetSortOrder() );
self:settext( s ); self:settext( s );
@@ -285,10 +334,15 @@ t[#t+1] = StandardDecorationFromFileOptional("SongOptions","SongOptionsText") ..
-- Sounds -- Sounds
t[#t+1] = Def.ActorFrame { t[#t+1] = Def.ActorFrame {
LoadActor(THEME:GetPathS("_switch","up")) .. { LoadActor(THEME:GetPathS("_switch","up")) .. {
SelectMenuOpenedMessageCommand=cmd(stop;play); SelectMenuOpenedMessageCommand=function(self)
self:playcommand("Set");
end;
}; };
LoadActor(THEME:GetPathS("_switch","down")) .. { LoadActor(THEME:GetPathS("_switch","down")) .. {
SelectMenuClosedMessageCommand=cmd(stop;play); SelectMenuClosedMessageCommand=function(self)
self:stop();
self:play();
end;
}; };
}; };
@@ -7,10 +7,21 @@ function GetLocalProfiles()
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";
@@ -27,7 +38,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") );
}; };
@@ -44,8 +57,14 @@ function LoadPlayerStuff(Player)
LoadFont("Common Normal") .. { LoadFont("Common Normal") .. {
Text=THEME:GetString("ScreenSelectProfile","PressStart"); Text=THEME:GetString("ScreenSelectProfile","PressStart");
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;
}; };
}; };
table.insert( ret, t ); table.insert( ret, t );
@@ -59,22 +78,49 @@ function LoadPlayerStuff(Player)
t = Def.ActorFrame { t = 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;
}; };
}; };
table.insert( ret, t ); table.insert( ret, t );
@@ -82,7 +128,12 @@ function LoadPlayerStuff(Player)
t = Def.ActorScroller{ t = Def.ActorScroller{
Name = 'ProfileScroller'; Name = 'ProfileScroller';
NumItemsToDraw=6; NumItemsToDraw=6;
OnCommand=cmd(y,1;SetFastCatchup,true;SetMask,200,58;SetSecondsPerItem,0.15); OnCommand=function(self)
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);
@@ -98,7 +149,10 @@ function LoadPlayerStuff(Player)
table.insert( ret, t ); table.insert( ret, t );
t = LoadFont("Common Normal") .. { t = LoadFont("Common Normal") .. {
Name = 'SelectedProfileText'; Name = 'SelectedProfileText';
InitCommand=cmd(y,160;shadowlength,1;); InitCommand=function(self)
self:y(160);
self:shadowlength(1);
end;
}; };
table.insert( ret, t ); table.insert( ret, t );
@@ -4,7 +4,9 @@ local course = GAMESTATE:GetCurrentCourse()
local t = Def.ActorFrame{ local t = Def.ActorFrame{
-- background -- background
Def.Sprite{ Def.Sprite{
InitCommand=cmd(Center); InitCommand=function(self)
self:(Center);
end;
BeginCommand=function(self) BeginCommand=function(self)
if course:GetBackgroundPath() then if course:GetBackgroundPath() then
self:Load( course:GetBackgroundPath() ) self:Load( course:GetBackgroundPath() )
@@ -13,13 +15,28 @@ local t = Def.ActorFrame{
self:LoadFromCurrentSongBackground() self:LoadFromCurrentSongBackground()
end end
end; end;
OnCommand=cmd(diffusealpha,0;scale_or_crop_background;sleep,0.5;linear,0.50;diffusealpha,1;sleep,3); OnCommand=function(self)
self:diffusealpha(0);
self:scale_or_crop_background();
self:sleep(0.5);
self:linear(0.50);
self:diffusealpha(1);
self:sleep(3);
end;
}; };
-- alternate background -- alternate background
Def.Sprite{ Def.Sprite{
InitCommand=cmd(Center;); InitCommand=function(self)
BeginCommand=cmd(LoadFromCurrentSongBackground;scale_or_crop_background;diffusealpha,0); self:(Center);
OnCommand=cmd(sleep,4;playcommand,"Show"); end;
BeginCommand=function(self)
self:LoadFromCurrentSongBackground();
self:scale_or_crop_background();
self:diffusealpha(0);
OnCommand=function(self)
self:sleep(4);
self:playcommand("Show");
end;
ShowCommand=function(self) ShowCommand=function(self)
if course:HasBackground() then if course:HasBackground() then
self:accelerate(0.25) self:accelerate(0.25)
@@ -29,14 +29,23 @@ end;
local t = Def.ActorFrame {}; local t = Def.ActorFrame {};
t[#t+1] = Def.Quad { t[#t+1] = Def.Quad {
InitCommand=cmd(Center;zoomto,SCREEN_WIDTH,SCREEN_HEIGHT;diffuse,Color("Black")); InitCommand=function(self)
self:Center();
self:zoomto(SCREEN_WIDTH, SCREEN_HEIGHT);
self:diffuse(Color("Black"));
end;
}; };
if GAMESTATE:IsCourseMode() then if GAMESTATE:IsCourseMode() then
t[#t+1] = LoadActor("CourseDisplay"); t[#t+1] = LoadActor("CourseDisplay");
else else
t[#t+1] = Def.Sprite { t[#t+1] = Def.Sprite {
InitCommand=cmd(Center;diffusealpha,0); InitCommand=function(self)
BeginCommand=cmd(LoadFromCurrentSongBackground); self:Center();
self:diffusealpha(0);
end;
BeginCommand=function(self)
self:LoadFromCurrentSongBackground();
end;
OnCommand=function(self) OnCommand=function(self)
if PREFSMAN:GetPreference("StretchBackgrounds") then if PREFSMAN:GetPreference("StretchBackgrounds") then
self:SetSize(SCREEN_WIDTH,SCREEN_HEIGHT) self:SetSize(SCREEN_WIDTH,SCREEN_HEIGHT)
@@ -52,29 +61,80 @@ else
end end
t[#t+1] = Def.ActorFrame { t[#t+1] = Def.ActorFrame {
InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y); InitCommand=function(self)
OnCommand=cmd(stoptweening;zoom,1.25;decelerate,3;zoom,1); self:x(SCREEN_CENTER_X);
self:y(SCREEN_CENTER_Y);
end;
OnCommand=function(self)
self:stoptweening();
self:zoom(1.25);
self:decelerate(3);
self:zoom(1);
end;
LoadActor( THEME:GetPathG("ScreenStageInformation", "Stage " .. ToEnumShortString(sStage) ) ) .. { LoadActor( THEME:GetPathG("ScreenStageInformation", "Stage " .. ToEnumShortString(sStage) ) ) .. {
OnCommand=cmd(diffusealpha,0;linear,0.25;diffusealpha,1;sleep,1.75;linear,0.5;zoomy,0;zoomx,2;diffusealpha,0); OnCommand=function(self)
self:diffusealpha(0);
self:linear(0.25);
self:diffusealpha(1);
self:sleep(1.75);
self:linear(0.5);
self:zoomy(0);
self:zoomx(2);
self:diffusealpha(0);
end;
}; };
}; };
t[#t+1] = Def.ActorFrame { t[#t+1] = Def.ActorFrame {
InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y+96); InitCommand=function(self)
OnCommand=cmd(stoptweening;addy,-16;decelerate,3;addy,16); self:x(SCREEN_CENTER_X);
self:y(SCREEN_CENTER_Y + 96);
end;
OnCommand=function(self)
self:stoptweening();
self:addy(-16);
self:decelerate(3);
self:addy(16);
end;
LoadFont("Common Normal") .. { LoadFont("Common Normal") .. {
Text=GAMESTATE:IsCourseMode() and GAMESTATE:GetCurrentCourse():GetDisplayFullTitle() or GAMESTATE:GetCurrentSong():GetDisplayFullTitle(); Text=GAMESTATE:IsCourseMode() and GAMESTATE:GetCurrentCourse():GetDisplayFullTitle() or GAMESTATE:GetCurrentSong():GetDisplayFullTitle();
InitCommand=cmd(strokecolor,Color("Outline");y,-20); InitCommand=function(self)
OnCommand=cmd(diffusealpha,0;linear,0.5;diffusealpha,1;sleep,1.5;linear,0.5;diffusealpha,0); self:strokecolor(Color("Outline"));
self:y(-20);
end;
OnCommand=function(self)
self:diffusealpha(0);
self:linear(0.5);
self:diffusealpha(1);
self:sleep(1.5);
self:linear(0.5);
self:diffusealpha(0);
end;
}; };
LoadFont("Common Normal") .. { LoadFont("Common Normal") .. {
Text=GAMESTATE:IsCourseMode() and ToEnumShortString( GAMESTATE:GetCurrentCourse():GetCourseType() ) or GAMESTATE:GetCurrentSong():GetDisplayArtist(); Text=GAMESTATE:IsCourseMode() and ToEnumShortString( GAMESTATE:GetCurrentCourse():GetCourseType() ) or GAMESTATE:GetCurrentSong():GetDisplayArtist();
InitCommand=cmd(strokecolor,Color("Outline");zoom,0.75); InitCommand=function(self)
OnCommand=cmd(diffusealpha,0;linear,0.5;diffusealpha,1;sleep,1.5;linear,0.5;diffusealpha,0); self:strokecolor(Color("Outline"));
self:zoom(0.75);
end;
OnCommand=function(self)
self:diffusealpha(0);
self:linear(0.5);
self:diffusealpha(1);
self:sleep(1.5);
self:linear(0.5);
self:diffusealpha(0);
end;
}; };
LoadFont("Common Normal") .. { LoadFont("Common Normal") .. {
InitCommand=cmd(strokecolor,Color("Outline");diffuse,Color("Orange");diffusebottomedge,Color("Yellow");zoom,0.75;y,20); InitCommand=function(self)
self:strokecolor(Color("Outline"));
self:diffuse(Color("Orange"));
self:diffusebottomedge(Color("Yellow"));
self:zoom(0.75);
self:y(20);
end;
BeginCommand=function(self) BeginCommand=function(self)
local text = ""; local text = "";
local SongOrCourse; local SongOrCourse;
@@ -92,7 +152,14 @@ t[#t+1] = Def.ActorFrame {
end; end;
self:settext(text); self:settext(text);
end; end;
OnCommand=cmd(diffusealpha,0;linear,0.5;diffusealpha,1;sleep,1.5;linear,0.5;diffusealpha,0); OnCommand=function(self)
self:diffusealpha(0);
self:linear(0.5);
self:diffusealpha(1);
self:sleep(1.5);
self:linear(0.5);
self:diffusealpha(0);
end;
}; };
}; };
@@ -1,48 +1,66 @@
local t = Def.ActorFrame {}; local t = Def.ActorFrame {};
local bOpen = false; local bOpen = false;
local function GetTime(self) local function GetTime(self)
-- Painfully ugly, sorry. -- Painfully ugly, sorry.
local c = self:GetChildren(); local c = self:GetChildren();
local tTime = { Hour = nil, Minute = nil, Second = nil, Append = nil}; local tTime = { Hour = nil, Minute = nil, Second = nil, Append = nil};
if Hour() then tTime.Hour = Hour() else tTime.Hour = 0 end; if Hour() then tTime.Hour = Hour() else tTime.Hour = 0 end;
if Minute() then tTime.Minute = Minute() else tTime.Minute = 0 end; if Minute() then tTime.Minute = Minute() else tTime.Minute = 0 end;
if Second() then tTime.Second = Second() else tTime.Second = 0 end; if Second() then tTime.Second = Second() else tTime.Second = 0 end;
if( Hour() < 12 ) then if( Hour() < 12 ) then
tTime.Append = "AM" tTime.Append = "AM"
else else
tTime.Append = "PM" tTime.Append = "PM"
end; end;
if( Hour() == 0 ) then if( Hour() == 0 ) then
tTime.Hour = 12; tTime.Hour = 12;
end; end;
c.Time:settextf("%02i:%02i:%02i %s",tTime.Hour,tTime.Minute,tTime.Second,tTime.Append); c.Time:settextf("%02i:%02i:%02i %s",tTime.Hour,tTime.Minute,tTime.Second,tTime.Append);
end; end;
t[#t+1] = Def.ActorFrame { t[#t+1] = Def.ActorFrame {
Def.ActorFrame { Def.ActorFrame {
LoadActor(THEME:GetPathB("","_frame 3x3"),"rounded black",96,12) .. { LoadActor(THEME:GetPathB("","_frame 3x3"),"rounded black",96,12) .. {
Name="Background"; Name="Background";
}; };
LoadFont("Common Normal") .. { LoadFont("Common Normal") .. {
Text="Test"; Text="Test";
Name="Time"; Name="Time";
InitCommand=cmd(zoom,0.675); InitCommand=function(self)
}; self:zoom(0.675);
-- end;
BeginCommand=function(self) };
self:SetUpdateFunction( GetTime ); --
self:SetUpdateRate( 1/30 ); BeginCommand=function(self)
end; self:SetUpdateFunction( GetTime );
}; self:SetUpdateRate( 1/30 );
ToggleConsoleDisplayMessageCommand=function(self) end;
bOpen = not bOpen; };
if bOpen then self:playcommand("Show") else self:playcommand("Hide") end ToggleConsoleDisplayMessageCommand=function(self)
end; bOpen = not bOpen;
InitCommand=cmd(x,SCREEN_RIGHT-50;y,10;zoomy,0); if bOpen then self:playcommand("Show") else self:playcommand("Hide") end
ShowCommand=cmd(finishtweening;zoomx,1;zoomy,0;bounceend,0.125;zoomy,1); end;
HideCommand=cmd(finishtweening;zoom,1;bouncebegin,0.125;zoomy,0); InitCommand=function(self)
self:x(SCREEN_RIGHT-50);
self:y(10);
self:zoomy(0);
end;
ShowCommand=function(self)
self:finishtweening();
self:zoomx(1);
self:zoomy(0);
self:bounceend(0.125);
self:zoomy(1);
end;
HideCommand=function(self)
self:finishtweening();
self:zoom(1);
self:bouncebegin(0.125);
self:zoomy(0);
end;
}; };
return t; return t;
@@ -1,30 +1,60 @@
local t = Def.ActorFrame {}; local t = Def.ActorFrame {};
t[#t+1] = Def.ActorFrame { t[#t+1] = Def.ActorFrame {
FOV=90; FOV=90;
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("#FFCB05");diffusebottomedge,color("#F0BA00")); self:scaletoclipped(SCREEN_WIDTH,SCREEN_HEIGHT);
end;
OnCommand=function(self)
self:diffuse(color("#FFCB05"));
self:diffusebottomedge(color("#F0BA00"));
end;
}; };
Def.ActorFrame { Def.ActorFrame {
Def.ActorFrame { Def.ActorFrame {
InitCommand=cmd(hide_if,hideFancyElements;); InitCommand=function(self)
OffCommand=cmd(decelerate,0.25;rotationx,-90/4*3.5;y,SCREEN_CENTER_Y); self:hide_if(hideFancyElements);
ShiftCommand=cmd( end;
smooth,1.25;z,256; OffCommand=function(self)
sleep,2; self:decelerate(0.25);
smooth,1.25;z,0; self:rotationx(-90 / 4 * 3.5);
sleep,2;queuecommand,"Shift" self:y(SCREEN_CENTER_Y);
); end;
FlipCommand=cmd( ShiftCommand=function(self)
smooth,0.5;rotationy,180; self:smooth(1.25);
sleep,2;smooth,0.5;rotationy,360; self:z(256);
sleep,1;rotationy,0;sleep,1; self:sleep(2);
queuecommand,"Flip" self:smooth(1.25);
); self:z(0);
self:sleep(2);
self:queuecommand("Shift");
end;
FlipCommand=function(self)
self:smooth(0.5);
self:rotationy(180);
self:sleep(2);
self:smooth(0.5);
self:rotationy(360);
self:sleep(1);
self:rotationy(0);
self:sleep(1);
self:queuecommand("Flip");
end;
LoadActor(THEME:GetPathB("ScreenWithMenuElements","background/_checkerboard")) .. { LoadActor(THEME:GetPathB("ScreenWithMenuElements","background/_checkerboard")) .. {
InitCommand=cmd(zoomto,SCREEN_WIDTH*2,SCREEN_HEIGHT*2;customtexturerect,0,0,SCREEN_WIDTH*4/256,SCREEN_HEIGHT*4/256); InitCommand=function(self)
OnCommand=cmd(texcoordvelocity,0,0.5;diffuse,color("#ffd400");diffusealpha,0.5;fadetop,1;fadebottom,1); self:zoomto(SCREEN_WIDTH * 2, SCREEN_HEIGHT * 2);
self:customtexturerect(0, 0, SCREEN_WIDTH * 4 / 256, SCREEN_HEIGHT * 4 / 256);
end;
OnCommand=function(self)
self:texcoordvelocity(0, 0.5);
self:diffuse(color("#ffd400"));
self:diffusealpha(0.5);
self:fadetop(1);
self:fadebottom(1);
end;
}; };
}; };
}; };
@@ -17,16 +17,35 @@ local function Clock()
-- clock -- clock
clock = Def.ActorFrame { clock = Def.ActorFrame {
Name="Clock", Name="Clock",
InitCommand=cmd(x,50;y,12;playcommand,"Update"), InitCommand=function(self)
self:x(50);
self:y(12);
self:playcommand("Update")
end;
ScreenChangedMessageCommand=UpdateVisible, ScreenChangedMessageCommand=UpdateVisible,
UpdateCommand=cmd(runcommandsonleaves,cmd(queuecommand,"Update")), UpdateCommand=function(self)
Def.RoundedBox(90,26)..{ InitCommand=cmd(x,-22;y,-4) }, self:runcommandsonleaves(function(self)
self:queuecommand("Update");
end;);
end;
Def.RoundedBox(90,26)..{
InitCommand=function(self)
self:x(-22);
self:y(-4);
end;
};
Def.ActorFrame { Def.ActorFrame {
Name="ClockText", Name="ClockText",
InitCommand=cmd(y,-2), InitCommand=function(self)
self:y(-2);
end;
LoadFont("Common", "normal")..{ LoadFont("Common", "normal")..{
Text="00:00:", Text="00:00:",
InitCommand=cmd(horizalign,right;shadowlength,0;diffusebottomedge,color("0.9,0.9,0.9")), InitCommand=function(self)
self:horizalign(right);
self:shadowlength(0);
self:diffusebottomedge(color("0.9,0.9,0.9"));
end;
UpdateCommand=function(self) UpdateCommand=function(self)
local hour, min = Hour(), Minute() local hour, min = Hour(), Minute()
if hour > 12 and GetUserPrefB("Use12HourClock") then if hour > 12 and GetUserPrefB("Use12HourClock") then
@@ -41,7 +60,11 @@ local function Clock()
}, },
LoadFont("Common", "normal")..{ LoadFont("Common", "normal")..{
Text="00", Text="00",
InitCommand=cmd(horizalign,left;shadowlength,0;diffusebottomedge,color("0.9,0.9,0.9")), InitCommand=function(self)
self:horizalign(left);
self:shadowlength(0);
self:diffusebottomedge(color("0.9,0.9,0.9"));
end;
UpdateCommand=function(self) UpdateCommand=function(self)
local sec = Second() local sec = Second()
self:settext(string.format('%02i', sec)) self:settext(string.format('%02i', sec))
@@ -51,7 +74,15 @@ local function Clock()
}, },
LoadFont("Common", "normal")..{ LoadFont("Common", "normal")..{
Text="", Text="",
InitCommand=cmd(x,28;y,-3;horizalign,left;shadowlength,0;diffusebottomedge,color("0.9,0.9,0.9");visible,false;zoom,0.75), InitCommand=function(self)
self:x(28);
self:y(-3);
self:horizalign(left);
self:shadowlength(0);
self:diffusebottomedge(color("0.9,0.9,0.9"));
self:visible(false);
self:zoom(0.75);
end;
UpdateCommand=function(self) UpdateCommand=function(self)
if not GetUserPrefB("Use12HourClock") then if not GetUserPrefB("Use12HourClock") then
self:visible(false) self:visible(false)
@@ -1,35 +1,46 @@
local t = Def.ActorFrame {}; local t = Def.ActorFrame {};
t[#t+1] = Def.ActorFrame { t[#t+1] = Def.ActorFrame {
FOV=90; FOV=90;
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("#FFCB05");diffusebottomedge,color("#F0BA00")); self:scaletoclipped(SCREEN_WIDTH,SCREEN_HEIGHT);
end;
OnCommand=function(self)
self:diffuse(color("#FFCB05"));
self:diffusebottomedge(color("#F0BA00"));
end;
}; };
Def.ActorFrame { Def.ActorFrame {
InitCommand=cmd(hide_if,hideFancyElements;); InitCommand=function(self)
self:hide_if(hideFancyElements);
end;
LoadActor("_checkerboard") .. { LoadActor("_checkerboard") .. {
InitCommand=cmd(rotationy,0;rotationz,0;rotationx,-90/4*3.5;zoomto,SCREEN_WIDTH*2,SCREEN_HEIGHT*2;customtexturerect,0,0,SCREEN_WIDTH*4/256,SCREEN_HEIGHT*4/256); InitCommand=function(self)
OnCommand=cmd(texcoordvelocity,0,0.5;diffuse,color("#ffd400");diffusealpha,0.5;fadetop,1); self:rotationy(0);
self:rotationz(0);
self:rotationx(-90 / 4 * 3.5);
self:zoomto(SCREEN_WIDTH * 2, SCREEN_HEIGHT * 2);
self:customtexturerect(0, 0, SCREEN_WIDTH * 4 / 256, SCREEN_HEIGHT * 4 / 256);
end;
OnCommand=function(self)
self:texcoordvelocity(0, 0.5);
self:diffuse(color("#ffd400"));
self:diffusealpha(0.5);
self:fadetop(1);
end;
}; };
}; };
LoadActor("_particleLoader") .. { LoadActor("_particleLoader") .. {
InitCommand=cmd(x,-SCREEN_CENTER_X;y,-SCREEN_CENTER_Y;hide_if,hideFancyElements;); InitCommand=function(self)
self:x(-SCREEN_CENTER_X);
self:y(-SCREEN_CENTER_Y);
self:hide_if(hideFancyElements);
end;
}; };
--[[ LoadActor("_particles") .. {
InitCommand=cmd(x,-SCREEN_CENTER_X;y,-SCREEN_CENTER_Y);
}; --]]
--[[ LoadActor("_pattern") .. {
InitCommand=cmd(z,32;x,4;y,4;;rotationy,-12.25;rotationz,-30;rotationx,-20;zoomto,SCREEN_WIDTH*2,SCREEN_HEIGHT*2;customtexturerect,0,0,SCREEN_WIDTH*4/256,SCREEN_HEIGHT*4/256);
OnCommand=cmd(texcoordvelocity,0.125,0.5;diffuse,Color("Black");diffusealpha,0.5);
}; --]]
--[[ LoadActor("_grid") .. {
InitCommand=cmd(customtexturerect,0,0,(SCREEN_WIDTH+1)/4,SCREEN_HEIGHT/4;SetTextureFiltering,true);
OnCommand=cmd(zoomto,SCREEN_WIDTH+1,SCREEN_HEIGHT;diffuse,Color("Black");diffuseshift;effecttiming,(1/8)*2,0,(7/8)*2,0;effectclock,'beatnooffset';
effectcolor2,Color("White");effectcolor1,Color("Black");fadebottom,0.25;fadetop,0.25;croptop,48/480;cropbottom,48/480;blend,Blend.Add;
diffusealpha,0.155);
}; --]]
}; };
return t; return t;
@@ -2,34 +2,27 @@ local fTileSize = 32;
local iTilesX = math.ceil( SCREEN_WIDTH/fTileSize ); local iTilesX = math.ceil( SCREEN_WIDTH/fTileSize );
local iTilesY = math.ceil( SCREEN_HEIGHT/fTileSize ); local iTilesY = math.ceil( SCREEN_HEIGHT/fTileSize );
local fSleepTime = THEME:GetMetric( Var "LoadingScreen","ScreenInDelay"); local fSleepTime = THEME:GetMetric( Var "LoadingScreen","ScreenInDelay");
--[[ local function Actor:PositionTile(self,iX,iY)
self:x( scale(iX,1,iTilesX,-SCREEN_CENTER_X,SCREEN_CENTER_X) );
self:y( scale(iY,1,iTilesY,-SCREEN_CENTER_Y,SCREEN_CENTER_Y) );
end --]]
local t = Def.ActorFrame { local t = Def.ActorFrame {
InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y); InitCommand=function(self)
OnCommand=cmd(sleep,fSleepTime); self:x(SCREEN_CENTER_X);
self:y(SCREEN_CENTER_Y);
end;
OnCommand=function(self)
self:sleep(fSleepTime);
end;
}; };
--[[ for indx=1,iTilesX do
for indy=1,iTilesY do
t[#t+1] = Def.Quad {
InitCommand=cmd(zoom,fTileSize-2;
x,math.floor( scale(indx,1,iTilesX,(iTilesX/2)*fTileSize*-1,(iTilesX/2)*fTileSize*1) );
y,math.floor( scale(indy,1,iTilesY,(iTilesY/2)*fTileSize*-1,(iTilesY/2)*fTileSize*1) );
);
OnCommand=cmd(diffuse,Color("Black");diffusealpha,1;zoom,fTileSize-2;sleep,(iTilesX+iTilesY)*(1/60);linear,0.0325 + ( indx / 60 );diffusealpha,0;zoom,fTileSize*1.25);
};
end
end --]]
t[#t+1] = Def.Quad { t[#t+1] = Def.Quad {
InitCommand=cmd(zoomto,SCREEN_WIDTH+1,SCREEN_HEIGHT); InitCommand=function(self)
OnCommand=cmd(diffuse,color("0,0,0,1");sleep,0.0325 + fSleepTime;linear,0.15;diffusealpha,0); self:zoomto(SCREEN_WIDTH + 1, SCREEN_HEIGHT);
end;
OnCommand=function(self)
self:diffuse(color("0,0,0,1"));
self:sleep(0.0325 + fSleepTime);
self:linear(0.15);
self:diffusealpha(0);
end;
}; };
--[[ return Def.ActorFrame {
Def.Quad {
InitCommand=cmd(Center;zoomto,SCREEN_WIDTH+1,SCREEN_HEIGHT);
OnCommand=cmd(diffuse,color("0,0,0,1");linear,0.15;diffusealpha,0);
};
}; --]]
return t return t
@@ -2,34 +2,28 @@ local fTileSize = 32;
local iTilesX = math.ceil( SCREEN_WIDTH/fTileSize ); local iTilesX = math.ceil( SCREEN_WIDTH/fTileSize );
local iTilesY = math.ceil( SCREEN_HEIGHT/fTileSize ); local iTilesY = math.ceil( SCREEN_HEIGHT/fTileSize );
local fSleepTime = THEME:GetMetric( Var "LoadingScreen","ScreenOutDelay"); local fSleepTime = THEME:GetMetric( Var "LoadingScreen","ScreenOutDelay");
--[[ local function Actor:PositionTile(self,iX,iY)
self:x( scale(iX,1,iTilesX,-SCREEN_CENTER_X,SCREEN_CENTER_X) );
self:y( scale(iY,1,iTilesY,-SCREEN_CENTER_Y,SCREEN_CENTER_Y) );
end --]]
local t = Def.ActorFrame { local t = Def.ActorFrame {
InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y); InitCommand=function(self)
OnCommand=cmd(sleep,fSleepTime); self:x(SCREEN_CENTER_X);
self:y(SCREEN_CENTER_Y);
end;
OnCommand=function(self)
self:sleep(fSleepTime);
end;
}; };
--[[ for indx=1,iTilesX do
for indy=1,iTilesY do
t[#t+1] = Def.Quad {
InitCommand=cmd(zoom,fTileSize-2;
x,math.floor( scale(indx,1,iTilesX,(iTilesX/2)*fTileSize*-1,(iTilesX/2)*fTileSize*1) );
y,math.floor( scale(indy,1,iTilesY,(iTilesY/2)*fTileSize*-1,(iTilesY/2)*fTileSize*1) );
);
OnCommand=cmd(diffuse,Color("Black");diffusealpha,0;zoom,fTileSize*1.25;linear,0.0325 + ( indx / 60 );diffusealpha,1;zoom,fTileSize-2);
};
end
end --]]
t[#t+1] = Def.Quad { t[#t+1] = Def.Quad {
InitCommand=cmd(zoomto,SCREEN_WIDTH+1,SCREEN_HEIGHT); InitCommand=function(self)
OnCommand=cmd(diffuse,color("0,0,0,0");sleep,0.0325 + fSleepTime;linear,0.15;diffusealpha,1); self:zoomto(SCREEN_WIDTH + 1, SCREEN_HEIGHT);
end;
OnCommand=function(self)
self:diffuse(color("0,0,0,0"));
self:sleep(0.0325 + fSleepTime);
self:linear(0.15);
self:diffusealpha(0);
end;
}; };
--[[ return Def.ActorFrame {
Def.Quad {
InitCommand=cmd(Center;zoomto,SCREEN_WIDTH+1,SCREEN_HEIGHT);
OnCommand=cmd(diffuse,color("0,0,0,1");linear,0.15;diffusealpha,0);
};
}; --]]
return t return t
@@ -9,14 +9,31 @@ t[#t+1] = Def.ActorFrame {
ActorUtil.LoadAllCommandsAndSetXY(self,Var "LoadingScreen") ActorUtil.LoadAllCommandsAndSetXY(self,Var "LoadingScreen")
end; end;
LoadActor(THEME:GetPathG("OptionRowExit","Frame")) .. { LoadActor(THEME:GetPathG("OptionRowExit","Frame")) .. {
InitCommand=cmd(diffuse,Color("Orange");diffusealpha,0.35); InitCommand=function(self)
self:diffuse(Color("Orange"));
self:diffusealpha(0.35);
end;
}; };
LoadFont("Common Normal") .. { LoadFont("Common Normal") .. {
InitCommand=cmd(zoom,0.75;shadowlength,1;glowshift;strokecolor,Color("Outline");diffuse,Color("Orange");diffusetopedge,Color("Yellow");textglowmode,'TextGlowMode_Inner'); InitCommand=function(self)
self:zoom(0.75);
self:shadowlength(1);
self:glowshift();
self:strokecolor(Color("Outline"));
self:diffuse(Color("Orange"));
self:diffusetopedge(Color("Yellow"));
self:textglowmode('TextGlowMode_Inner');
end;
Text="TESTING"; Text="TESTING";
OnCommand=cmd(playcommand,"Refresh"); OnCommand=function(self)
CoinInsertedMessageCommand=cmd(playcommand,"Refresh"); self:playcommand("Refresh");
CoinModeChangedMessageCommand=cmd(playcommand,"Refresh"); end;
CoinInsertedMessageCommand=function(self)
self:playcommand("Refresh");
end;
CoinModeChangedMessageCommand=function(self)
self:playcommand("Refresh");
end;
RefreshCommand=function(self) RefreshCommand=function(self)
local bCanPlay = GAMESTATE:EnoughCreditsToJoin(); local bCanPlay = GAMESTATE:EnoughCreditsToJoin();
local bReady = GAMESTATE:GetNumSidesJoined() > 0; local bReady = GAMESTATE:GetNumSidesJoined() > 0;
@@ -1,23 +1,67 @@
return Def.ActorFrame { return Def.ActorFrame {
InitCommand=cmd(Center); InitCommand=function(self)
self:Center();
end;
Def.Quad { Def.Quad {
InitCommand=cmd(zoomto,SCREEN_WIDTH,SCREEN_HEIGHT;visible,false); InitCommand=function(self)
StartTransitioningCommand=cmd(visible,true;diffuse,Color("Black");sleep,3.5;diffusealpha,0); self:zoomto(SCREEN_WIDTH, SCREEN_HEIGHT);
self:visible(false);
end;
StartTransitioningCommand=function(self)
self:visible(true);
self:diffuse(Color("Black"));
self:sleep(3.5);
self:diffusealpha(0);
end;
}; };
-- Sublime -- Sublime
Def.Quad { Def.Quad {
InitCommand=cmd(zoomto,SCREEN_WIDTH,80;diffuse,Color("Orange");visible,false); InitCommand=function(self)
StartTransitioningCommand=cmd(visible,true;decelerate,2;zoomy,44;decelerate,0.5;diffusealpha,0); self:zoomto(SCREEN_WIDTH, 80);
self:diffuse(Color("Orange"));
self:visible(false);
end;
StartTransitioningCommand=function(self)
self:visible(true);
self:decelerate(2);
self:zoomy(44);
self:decelerate(0.5);
self:diffusealpha(0);
end;
}; };
LoadFont("Common Normal") .. { LoadFont("Common Normal") .. {
Text="This is only the beginning..."; Text="This is only the beginning...";
InitCommand=cmd(visible,false;shadowlength,1;shadowcolor,BoostColor(Color("Orange"),0.5)); InitCommand=function(self)
StartTransitioningCommand=cmd(visible,true;zoom,0.75;fadeleft,1;faderight,1;linear,1;faderight,0;fadeleft,0;sleep,1;decelerate,0.5;y,12;diffusealpha,0); self:visible(false);
self:shadowlength(1);
self:shadowcolor(BoostColor(Color("Orange"),0.5));
end;
StartTransitioningCommand=function(self)
self:visible(true);
self:zoom(0.75);
self:fadeleft(1);
self:faderight(1);
self:linear(1);
self:faderight(0);
self:fadeleft(0);
self:sleep(1);
self:decelerate(0.5);
self:y(12);
self:diffusealpha(0);
end;
}; };
-- End -- End
Def.Quad { Def.Quad {
InitCommand=cmd(zoomto,SCREEN_WIDTH,SCREEN_HEIGHT;diffuse,Color("White");visible,false); InitCommand=function(self)
StartTransitioningCommand=cmd(visible,true;decelerate,1;diffusealpha,0); self:zoomto(SCREEN_WIDTH, SCREEN_HEIGHT);
self:diffuse(Color("White"));
self:visible(false);
end;
StartTransitioningCommand=function(self)
self:visible(true);
self:decelerate(1);
self:diffusealpha(0);
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,12 +1,4 @@
return Def.ActorFrame { return Def.ActorFrame {
FOV=90; FOV=90;
--[[ LoadActor("shot") .. {
InitCommand=cmd(diffusealpha,0;zoom,2;blend,'BlendMode_Add');
MilestoneCommand=cmd(diffusealpha,0.75;rotationz,0;accelerate,2.5;diffusealpha,0;rotationz,360;zoom,2.5);
}; --]]
--[[ LoadActor("shot") .. {
InitCommand=cmd(diffusealpha,0;zoom,2;zoomx,-2;blend,'BlendMode_Add');
MilestoneCommand=cmd(diffusealpha,0.75;rotationz,-360;x,0;linear,2.5;diffusealpha,0;rotationz,0;zoom,2.5);
}; --]]
LoadActor(THEME:GetPathG("Combo","100Milestone")); LoadActor(THEME:GetPathG("Combo","100Milestone"));
}; };
@@ -1,11 +1,35 @@
local ShowFlashyCombo = ThemePrefs.Get("FlashyCombo") local ShowFlashyCombo = ThemePrefs.Get("FlashyCombo")
return Def.ActorFrame { return Def.ActorFrame {
LoadActor("explosion") .. { LoadActor("explosion") .. {
InitCommand=cmd(diffusealpha,0;blend,'BlendMode_Add';hide_if,not ShowFlashyCombo); InitCommand=function(self)
MilestoneCommand=cmd(rotationz,0;zoom,2;diffusealpha,0.5;linear,0.5;rotationz,90;zoom,1.75;diffusealpha,0); self:diffusealpha(0);
self:blend('BlendMode_Add');
self:hide_if(not ShowFlashyCombo);
end;
MilestoneCommand=function(self)
self:rotationz(0);
self:zoom(2);
self:diffusealpha(0.5);
self:linear(0.5);
self:rotationz(90);
self:zoom(1.75);
self:diffusealpha(0);
end;
}; };
LoadActor("explosion") .. { LoadActor("explosion") .. {
InitCommand=cmd(diffusealpha,0;blend,'BlendMode_Add';hide_if,not ShowFlashyCombo); InitCommand=function(self)
MilestoneCommand=cmd(rotationz,0;zoom,2;diffusealpha,0.5;linear,0.5;rotationz,-90;zoom,2.5;diffusealpha,0); self:diffusealpha(0);
self:blend('BlendMode_Add');
self:hide_if(not ShowFlashyCombo);
end;
MilestoneCommand=function(self)
self:rotationz(0);
self:zoom(2);
self:diffusealpha(0.5);
self:linear(0.5);
self:rotationz(-90);
self:zoom(1.75);
self:diffusealpha(0);
end;
}; };
}; };
@@ -12,23 +12,22 @@ local grades = {
Grade_None = 8; Grade_None = 8;
}; };
--[[ local t = LoadActor( "grades" ) .. {
InitCommand=cmd(pause);
SetGradeCommand=function(self, params)
local state = grades[params.Grade] or grades.Grade_None;
state = state*2;
if params.PlayerNumber == PLAYER_2 then
state = state+1;
end
self:setstate(state);
end;
}; --]]
local t = LoadFont("Common Normal") .. { local t = LoadFont("Common Normal") .. {
InitCommand=cmd(zoom,0.75;shadowlength,1;strokecolor,Color("Black")); InitCommand=function(self)
ShowCommand=cmd(stoptweening;bounceend,0.15;zoomy,0.75); self:zoom(0.75);
HideCommand=cmd(stoptweening;bouncebegin,0.15;zoomy,0); self:shadowlength(1);
self:strokecolor(Color("Black"));
end;
ShowCommand=function(self)
self:stoptweening();
self:bounceend(0.15);
self:zoomy(0.75);
end;
HideCommand=function(self)
self:stoptweening();
self:bouncebegin(0.15);
self:zoomy(0);
end;
SetGradeCommand=function(self,params) SetGradeCommand=function(self,params)
local pnPlayer = params.PlayerNumber; local pnPlayer = params.PlayerNumber;
local sGrade = params.Grade or 'Grade_None'; local sGrade = params.Grade or 'Grade_None';
@@ -38,12 +37,6 @@ local t = LoadFont("Common Normal") .. {
self:diffuse(PlayerColor(pnPlayer)); self:diffuse(PlayerColor(pnPlayer));
self:diffusetopedge(BoostColor(PlayerColor(pnPlayer),1.5)); self:diffusetopedge(BoostColor(PlayerColor(pnPlayer),1.5));
self:strokecolor(BoostColor(PlayerColor(pnPlayer),0.25)); self:strokecolor(BoostColor(PlayerColor(pnPlayer),0.25));
--[[ if sGrade == "Grade_NoTier" then
self:playcommand("Hide");
else
self:playcommand("Show");
end; --]]
end; end;
}; };
+52 -12
View File
@@ -22,13 +22,25 @@ local function CreatePaneDisplayItem( _pnPlayer, _sLabel, _rcRadarCategory )
return Def.ActorFrame { return Def.ActorFrame {
LoadFont("Common SemiBold") .. { LoadFont("Common SemiBold") .. {
Text=string.upper( THEME:GetString("PaneDisplay",_sLabel) ); Text=string.upper( THEME:GetString("PaneDisplay",_sLabel) );
InitCommand=cmd(horizalign,left); InitCommand=function(self)
OnCommand=cmd(zoom,0.5875;diffuse,color("0.9,0.9,0.9");shadowlength,1); self:horizalign(left);
end;
OnCommand=function(self)
self:zoom(0.5875);
self:diffuse(color("0.9,0.9,0.9"));
self:shadowlength(1);
end;
}; };
LoadFont("Common Normal") .. { LoadFont("Common Normal") .. {
Text=string.format("%04i", 0); Text=string.format("%04i", 0);
InitCommand=cmd(x,96;horizalign,right); InitCommand=function(self)
OnCommand=cmd(zoom,0.5875;shadowlength,1); self:x(96);
self:horizalign(right);
end;
OnCommand=function(self)
self:zoom(0.5875);
self:shadowlength(1);
end;
CurrentSongChangedMessageCommand=function(self) CurrentSongChangedMessageCommand=function(self)
self:playcommand("Set"); self:playcommand("Set");
end; end;
@@ -64,16 +76,37 @@ local function CreatePaneDisplayGraph( _pnPlayer, _sLabel, _rcRadarCategory )
return Def.ActorFrame { return Def.ActorFrame {
LoadFont("Common Normal") .. { LoadFont("Common Normal") .. {
Text=_sLabel; Text=_sLabel;
InitCommand=cmd(horizalign,left); InitCommand=function(self)
OnCommand=cmd(zoom,0.5;shadowlength,1); self:horizalign(left);
end;
OnCommand=function(self)
self:zoom(0.5);
self:shadowlength(1);
end;
}; };
Def.Quad { Def.Quad {
InitCommand=cmd(x,12;zoomto,50,10;horizalign,left); InitCommand=function(self)
OnCommand=cmd(diffuse,Color("Black");shadowlength,1;diffusealpha,0.5); self:x(12);
self:zoomto(50, 10);
self:horizalign(left);
end;
OnCommand=function(self)
self:diffuse(Color("Black"));
self:shadowlength(1);
self:diffusealpha(0.5);
end;
}; };
Def.Quad { Def.Quad {
InitCommand=cmd(x,12;zoomto,50,10;horizalign,left); InitCommand=function(self)
OnCommand=cmd(shadowlength,0;diffuse,Color("Green");diffusebottomedge,ColorLightTone(Color("Green"))); self:x(12);
self:zoomto(50, 10);
self:horizalign(left);
end;
OnCommand=function(self)
self:shadowlength(0);
self:diffuse(Color("Green"));
self:diffusebottomedge(ColorLightTone(Color("Green")));
end;
CurrentSongChangedMessageCommand=function(self) CurrentSongChangedMessageCommand=function(self)
self:playcommand("Set"); self:playcommand("Set");
end; end;
@@ -107,8 +140,15 @@ local function CreatePaneDisplayGraph( _pnPlayer, _sLabel, _rcRadarCategory )
end; end;
}; };
LoadFont("Common Normal") .. { LoadFont("Common Normal") .. {
InitCommand=cmd(x,14;zoom,0.5;halign,0;); InitCommand=function(self)
OnCommand=cmd(shadowlength,1;strokecolor,color("0.15,0.15,0.15,0.625")); self:x(14);
self:zoom(0.5);
self:halign(0);
end;
OnCommand=function(self)
self:shadowlength(1);
self:strokecolor(color("0.15,0.15,0.15,0.625"));
end;
CurrentSongChangedMessageCommand=function(self) CurrentSongChangedMessageCommand=function(self)
self:playcommand("Set"); self:playcommand("Set");
end; end;
@@ -16,17 +16,27 @@ local LabelMaxZoom = THEME:GetMetric("Combo", "LabelMaxZoom");
local ShowFlashyCombo = ThemePrefs.Get("FlashyCombo") local ShowFlashyCombo = ThemePrefs.Get("FlashyCombo")
local t = Def.ActorFrame { local t = Def.ActorFrame {
InitCommand=cmd(vertalign,bottom); InitCommand=function(self)
self:vertalign(bottom);
end;
-- flashy combo elements: -- flashy combo elements:
LoadActor(THEME:GetPathG("Combo","100Milestone")) .. { LoadActor(THEME:GetPathG("Combo","100Milestone")) .. {
Name="OneHundredMilestone"; Name="OneHundredMilestone";
InitCommand=cmd(visible,ShowFlashyCombo); InitCommand=function(self)
FiftyMilestoneCommand=cmd(playcommand,"Milestone"); self:visible(ShowFlashyCombo);
end;
FiftyMilestoneCommand=function(self)
self:playcommand("Milestone");
end;
}; };
LoadActor(THEME:GetPathG("Combo","1000Milestone")) .. { LoadActor(THEME:GetPathG("Combo","1000Milestone")) .. {
Name="OneThousandMilestone"; Name="OneThousandMilestone";
InitCommand=cmd(visible,ShowFlashyCombo); InitCommand=function(self)
ToastyAchievedMessageCommand=cmd(playcommand,"Milestone"); self:visible(ShowFlashyCombo);
end;
ToastyAchievedMessageCommand=function(self)
self:playcommand("Milestone");
end;
}; };
-- normal combo elements: -- normal combo elements:
Def.ActorFrame { Def.ActorFrame {
@@ -53,32 +63,16 @@ local t = Def.ActorFrame {
end; end;
-- Milestones: -- Milestones:
-- 25,50,100,250,600 Multiples; -- 25,50,100,250,600 Multiples;
--[[ if (iCombo % 100) == 0 then
c.OneHundredMilestone:playcommand("Milestone");
elseif (iCombo % 250) == 0 then
-- It should really be 1000 but thats slightly unattainable, since
-- combo doesnt save over now.
c.OneThousandMilestone:playcommand("Milestone");
else
return
end; --]]
TwentyFiveMilestoneCommand=function(self,parent) TwentyFiveMilestoneCommand=function(self,parent)
if ShowFlashyCombo then if ShowFlashyCombo then
(cmd(finishtweening;addy,-4;bounceend,0.125;addy,4))(self); self:finishtweening();
self:addy(-4);
self:bounceend(0.125);
self:addy(4);
end; end;
end; end;
--]]
--[[
ToastyAchievedMessageCommand=function(self,params)
if params.PlayerNumber == player then
(cmd(thump,2;effectclock,'beat'))(c.ComboFrame);
end;
end;
ToastyDroppedMessageCommand=function(self,params)
if params.PlayerNumber == player then
(cmd(stopeffect))(c.ComboFrame);
end;
end; --]]
ComboCommand=function(self, param) ComboCommand=function(self, param)
local iCombo = param.Misses or param.Combo; local iCombo = param.Misses or param.Combo;
if not iCombo or iCombo < ShowComboAt then if not iCombo or iCombo < ShowComboAt then
@@ -144,15 +138,7 @@ local t = Def.ActorFrame {
end end
-- 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;
@@ -56,7 +56,10 @@ 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=function(self) ResetCommand=function(self)
self:finishtweening(); self:finishtweening();
@@ -67,7 +70,9 @@ t[#t+1] = Def.ActorFrame {
LoadFont("Combo Numbers") .. { LoadFont("Combo Numbers") .. {
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=function(self) ResetCommand=function(self)
self:finishtweening(); self:finishtweening();
@@ -78,7 +83,9 @@ t[#t+1] = Def.ActorFrame {
LoadFont("Common Normal") .. { LoadFont("Common Normal") .. {
Name="ProtimingAverage"; Name="ProtimingAverage";
Text=""; Text="";
InitCommand=cmd(visible,false); InitCommand=function(self)
self:visible(false);
end;
OnCommand=THEME:GetMetric("Protiming","AverageOnCommand"); OnCommand=THEME:GetMetric("Protiming","AverageOnCommand");
ResetCommand=function(self) ResetCommand=function(self)
self:finishtweening(); self:finishtweening();
@@ -89,7 +96,9 @@ t[#t+1] = Def.ActorFrame {
LoadFont("Common Normal") .. { LoadFont("Common Normal") .. {
Name="TextDisplay"; Name="TextDisplay";
Text=THEME:GetString("Protiming","MS"); Text=THEME:GetString("Protiming","MS");
InitCommand=cmd(visible,false); InitCommand=function(self)
self:visible(false);
end;
OnCommand=THEME:GetMetric("Protiming","TextOnCommand"); OnCommand=THEME:GetMetric("Protiming","TextOnCommand");
ResetCommand=function(self) ResetCommand=function(self)
self:finishtweening(); self:finishtweening();
@@ -99,79 +108,148 @@ t[#t+1] = Def.ActorFrame {
}; };
Def.Quad { Def.Quad {
Name="ProtimingGraphBG"; Name="ProtimingGraphBG";
InitCommand=cmd(visible,false;y,32;zoomto,ProtimingWidth,16); InitCommand=function(self)
ResetCommand=cmd(finishtweening;diffusealpha,0.8;visible,false); self:visible(false);
OnCommand=cmd(diffuse,Color("Black");diffusetopedge,color("0.1,0.1,0.1,1");diffusealpha,0.8;shadowlength,2;); self:y(32);
self:zoomto(ProtimingWidth, 16);
end;
ResetCommand=function(self)
self:finishtweening();
self:diffusealpha(0.8);
self:visible(false);
end;
OnCommand=function(self)
self:diffuse(Color("Black"));
self:diffusetopedge(color("0.1,0.1,0.1,1"));
self:diffusealpha(0.8);
self:shadowlength(2);
end;
}; };
Def.Quad { Def.Quad {
Name="ProtimingGraphWindowW3"; Name="ProtimingGraphWindowW3";
InitCommand=cmd(visible,false;y,32;zoomto,ProtimingWidth-4,16-4); InitCommand=function(self)
self:visible(false);
self:y(32);
self:zoomto(ProtimingWidth - 4, 16 - 4);
end;
ResetCommand=function(self) ResetCommand=function(self)
self:finishtweening(); self:finishtweening();
self:diffusealpha(1); self:diffusealpha(1);
self:visible(false); self:visible(false);
end; end;
OnCommand=cmd(diffuse,GameColor.Judgment["JudgmentLine_W3"];); OnCommand=function(self)
self:diffuse(GameColor.Judgment["JudgmentLine_W3"]);
end;
}; };
Def.Quad { Def.Quad {
Name="ProtimingGraphWindowW2"; Name="ProtimingGraphWindowW2";
InitCommand=cmd(visible,false;y,32;zoomto,scale(PREFSMAN:GetPreference("TimingWindowSecondsW2"),0,PREFSMAN:GetPreference("TimingWindowSecondsW3"),0,ProtimingWidth-4),16-4); InitCommand=function(self)
self:visible(false);
self:y(32);
self:zoomto(scale(
PREFSMAN:GetPreference("TimingWindowSecondsW2"),
0,
PREFSMAN:GetPreference("TimingWindowSecondsW3"),
0,
ProtimingWidth-4),16-4);
end;
ResetCommand=function(self) ResetCommand=function(self)
self:finishtweening(); self:finishtweening();
self:diffusealpha(1); self:diffusealpha(1);
self:visible(false); self:visible(false);
end; end;
OnCommand=cmd(diffuse,GameColor.Judgment["JudgmentLine_W2"];); OnCommand=function(self)
self:diffuse(GameColor.Judgment["JudgmentLine_W2"]);
end;
}; };
Def.Quad { Def.Quad {
Name="ProtimingGraphWindowW1"; Name="ProtimingGraphWindowW1";
InitCommand=cmd(visible,false;y,32;zoomto,scale(PREFSMAN:GetPreference("TimingWindowSecondsW1"),0,PREFSMAN:GetPreference("TimingWindowSecondsW3"),0,ProtimingWidth-4),16-4); InitCommand=function(self)
self:visible(false);
self:y(32);
self:zoomto(scale(
PREFSMAN:GetPreference("TimingWindowSecondsW1"),
0,
PREFSMAN:GetPreference("TimingWindowSecondsW3"),
0,
ProtimingWidth-4),16-4);
end;
ResetCommand=function(self) ResetCommand=function(self)
self:finishtweening(); self:finishtweening();
self:diffusealpha(1); self:diffusealpha(1);
self:visible(false); self:visible(false);
end; end;
OnCommand=cmd(diffuse,GameColor.Judgment["JudgmentLine_W1"];); OnCommand=function(self)
self:diffuse(GameColor.Judgment["JudgmentLine_W1"]);
end;
}; };
Def.Quad { Def.Quad {
Name="ProtimingGraphUnderlay"; Name="ProtimingGraphUnderlay";
InitCommand=cmd(visible,false;y,32;zoomto,ProtimingWidth-4,16-4); InitCommand=function(self)
self:visible(false);
self:y(32);
self:zoomto(ProtimingWidth-4,16-4);
end;
ResetCommand=function(self) ResetCommand=function(self)
self:finishtweening(); self:finishtweening();
self:diffusealpha(0.25); self:diffusealpha(0.25);
self:visible(false); self:visible(false);
end; end;
OnCommand=cmd(diffuse,Color("Black");diffusealpha,0.25); OnCommand=function(self)
self:diffuse(Color("Black"));
self:diffusealpha(0.25);
end;
}; };
Def.Quad { Def.Quad {
Name="ProtimingGraphFill"; Name="ProtimingGraphFill";
InitCommand=cmd(visible,false;y,32;zoomto,0,16-4;horizalign,left;); InitCommand=function(self)
self:visible(false);
self:y(32);
self:zoomto(0,16-4);
self:horizalign(left);
end;
ResetCommand=function(self) ResetCommand=function(self)
self:finishtweening(); self:finishtweening();
self:diffusealpha(1); self:diffusealpha(1);
self:visible(false); self:visible(false);
end; end;
OnCommand=cmd(diffuse,Color("Red");); OnCommand=function(self)
self:diffuse(Color("Red"));
end;
}; };
Def.Quad { Def.Quad {
Name="ProtimingGraphAverage"; Name="ProtimingGraphAverage";
InitCommand=cmd(visible,false;y,32;zoomto,2,7;); InitCommand=function(self)
self:visible(false);
self:y(32);
self:zoomto(2,7);
end;
ResetCommand=function(self) ResetCommand=function(self)
self:finishtweening(); self:finishtweening();
self:diffusealpha(0.85); self:diffusealpha(0.85);
self:visible(false); self:visible(false);
end; end;
OnCommand=cmd(diffuse,Color("Orange");diffusealpha,0.85); OnCommand=function(self)
self:diffuse(Color("Orange"));
self:diffusealpha(0.85);
end;
}; };
Def.Quad { Def.Quad {
Name="ProtimingGraphCenter"; Name="ProtimingGraphCenter";
InitCommand=cmd(visible,false;y,32;zoomto,2,16-4;); InitCommand=function(self)
self:visible(false);
self:y(32);
self:zoomto(2,16-4);
end;
ResetCommand=function(self) ResetCommand=function(self)
self:finishtweening(); self:finishtweening();
self:diffusealpha(1); self:diffusealpha(1);
self:visible(false); self:visible(false);
end; end;
OnCommand=cmd(diffuse,Color("White");diffusealpha,1); OnCommand=function(self)
self:diffuse(Color("White"));
self:diffusealpha(1);
end;
}; };
InitCommand = function(self) InitCommand = function(self)
c = self:GetChildren(); c = self:GetChildren();
@@ -5,25 +5,48 @@ local fWidth = ( GAMESTATE:GetCurrentStyle():GetStyleType() == 'StyleType_OnePla
return Def.ActorFrame { return Def.ActorFrame {
ToastyAchievedMessageCommand=function(self,params) ToastyAchievedMessageCommand=function(self,params)
if params.PlayerNumber == Player then if params.PlayerNumber == Player then
(cmd(thump,1;effectclock,'beat';effectmagnitude,1,1,1; self:thump(1);
effectcolor1,color("1,1.125,1,1");effectcolor2,color("1,1,1,1")))(self); self:effectclock('beat');
self:effectmagnitude(1, 1, 1);
self:effectcolor1(color("1,1.125,1,1"));
self:effectcolor2(color("1,1,1,1"));
end end
end; end;
Def.Quad { Def.Quad {
InitCommand=cmd(zoomto,fWidth,SCREEN_HEIGHT;diffuse,PlayerColor(Player);diffusealpha,0;fadeleft,32/(256+16);faderight,32/(256+16)); InitCommand=function(self)
self:zoomto(fWidth, SCREEN_HEIGHT);
self:diffuse(PlayerColor(Player));
self:diffusealpha(0);
self:fadeleft(32 / (256 + 16));
self:faderight(32 / (256 + 16));
end;
ToastyAchievedMessageCommand=function(self,params) ToastyAchievedMessageCommand=function(self,params)
if params.PlayerNumber == Player then if params.PlayerNumber == Player then
(cmd(stoptweening;linear,2.125;diffuse,Color.Alpha( PlayerColor(Player), 0.345 );glow,color("1,1,1,0.5");decelerate,3;glow,Color.Alpha( ColorDarkTone( PlayerColor(Player) ), 0 );diffuseramp; self:stoptweening();
effectcolor1,ColorLightTone( PlayerColor(Player) );effectcolor2,PlayerColor(Player); self:linear(2.125);
effectclock,'beat';effectperiod,2; self:diffuse(Color.Alpha( PlayerColor(Player), 0.345 ));
))(self); self:glow(color("1,1,1,0.5"));
self:decelerate(3);
self:glow(Color.Alpha( ColorDarkTone( PlayerColor(Player) ), 0 ));
self:diffuseramp();
self:effectcolor1(ColorLightTone( PlayerColor(Player) ));
self:effectcolor2(PlayerColor(Player));
self:effectclock('beat');
self:effectperiod(2);
HasToasty = true; HasToasty = true;
end end
end; end;
ToastyDroppedMessageCommand=function(self,params) ToastyDroppedMessageCommand=function(self,params)
if params.PlayerNumber == Player then if params.PlayerNumber == Player then
if HasToasty then if HasToasty then
(cmd(finishtweening;stopeffect;glow,color("1,1,1,0.5");decelerate,0.35;diffuse,Color.Alpha( Color("Black"), 0.25 );glow,color("1,1,1,0");linear,0.35*0.25;diffusealpha,0))(self); self:finishtweening();
self:stopeffect();
self:glow(color("1,1,1,0.5"));
self:decelerate(0.35);
self:diffuse(Color.Alpha( Color("Black"), 0.25 ));
self:glow(color("1,1,1,0"));
self:linear(0.35 * 0.25);
self:diffusealpha(0);
HasToasty = false; HasToasty = false;
else else
return return
@@ -1,20 +1,35 @@
return Def.ActorFrame { return Def.ActorFrame {
LoadFont("Common Normal") .. { LoadFont("Common Normal") .. {
Name="TextTitle"; Name="TextTitle";
InitCommand=cmd(y,-16.5;zoom,0.875;maxwidth,256/0.875;); InitCommand=function(self)
OnCommand=cmd(shadowlength,1); self:y(-16.5);
-- TickCommand=cmd(finishtweening;diffusealpha,0;addx,-10;zoomx,1.25;zoomy,0;decelerate,0.25;diffusealpha,1;addx,10;zoom,1;sleep,0;glow,Color("White");decelerate,0.275;glow,Color("Invisible")); self:zoom(0.875);
self:maxwidth(256/0.875);
end;
OnCommand=function(self)
self:shadowlength(1);
end;
}; };
LoadFont("Common Normal") .. { LoadFont("Common Normal") .. {
Name="TextSubtitle"; Name="TextSubtitle";
InitCommand=cmd(zoom,0.5;maxwidth,256/0.5); InitCommand=function(self)
OnCommand=cmd(shadowlength,1); self:zoom(0.5);
-- TickCommand=cmd(finishtweening;diffusealpha,0;addy,-10;addx,10;decelerate,0.25;diffusealpha,1;addy,10;addx,-10); self:maxwidth(256/0.5);
end;
OnCommand=function(self)
self:shadowlength(1);
end;
}; };
LoadFont("Common Normal") .. { LoadFont("Common Normal") .. {
Name="TextArtist"; Name="TextArtist";
InitCommand=cmd(y,18;zoom,0.75;maxwidth,256/0.75); InitCommand=function(self)
OnCommand=cmd(shadowlength,1;skewx,-0.2); self:y(18);
-- TickCommand=cmd(finishtweening;diffusealpha,0;addy,10;addx,10;decelerate,0.25;diffusealpha,1;addy,-10;addx,-10); self:zoom(0.75);
self:maxwidth(256/0.75);
end;
OnCommand=function(self)
self:shadowlength(1);
self:skewx(-0.2);
end;
}; };
}; };
@@ -14,22 +14,16 @@ local displaySingle = Def.ActorFrame{
-- manual bpm display -- manual bpm display
LoadFont("BPMDisplay", "bpm")..{ LoadFont("BPMDisplay", "bpm")..{
Name="BPMDisplay"; Name="BPMDisplay";
InitCommand=cmd(zoom,0.675;shadowlength,1); InitCommand=function(self)
self:zoom(0.675);
self:shadowlength(1);
end;
}; };
--[[
Def.SongBPMDisplay {
File=THEME:GetPathF("BPMDisplay", "bpm");
Name="BPMDisplay";
InitCommand=cmd(zoom,0.675;shadowlength,1);
SetCommand=function(self) self:SetFromGameState() end;
CurrentSongChangedMessageCommand=cmd(playcommand,"Set");
CurrentCourseChangedMessageCommand=cmd(playcommand,"Set");
};
--]]
}; };
displaySingle.InitCommand=cmd(SetUpdateFunction,UpdateSingleBPM); displaySingle.InitCommand=function(self)
self:SetUpdateFunction(UpdateSingleBPM);
end;
if numPlayers == 1 then if numPlayers == 1 then
return displaySingle return displaySingle
@@ -79,15 +73,25 @@ else
-- manual bpm displays -- manual bpm displays
LoadFont("BPMDisplay", "bpm")..{ LoadFont("BPMDisplay", "bpm")..{
Name="DisplayP1"; Name="DisplayP1";
InitCommand=cmd(x,-playerOffset;zoom,0.6;shadowlength,1); InitCommand=function(self)
self:x(-playerOffset);
self:zoom(0.6);
self:shadowlength(1);
end;
}; };
LoadFont("BPMDisplay", "bpm")..{ LoadFont("BPMDisplay", "bpm")..{
Name="DisplayP2"; Name="DisplayP2";
InitCommand=cmd(x,playerOffset;zoom,0.6;shadowlength,1); InitCommand=function(self)
self:x(playerOffset);
self:zoom(0.6);
self:shadowlength(1);
end;
}; };
}; };
displayTwoPlayers.InitCommand=cmd(SetUpdateFunction,Update2PBPM); displayTwoPlayers.InitCommand=function(self)
self:SetUpdateFunction(Update2PBPM);
end;
return displayTwoPlayers return displayTwoPlayers
end end
@@ -3,14 +3,40 @@ local squareSize = 8; -- was 18
return Def.ActorFrame { return Def.ActorFrame {
Def.Quad{ Def.Quad{
InitCommand=cmd(x,-12;zoom,squareSize;rotationz,45;diffuse,color("#222222")); InitCommand=function(self)
GainFocusCommand=cmd(stoptweening;accelerate,0.25;zoom,squareSize;rotationz,45;); self:x(-12);
LoseFocusCommand=cmd(stoptweening;decelerate,0.25;zoom,0;rotationz,360+45); self:zoom(squareSize);
self:rotationz(45);
self:diffuse(color("#222222"));
end;
GainFocusCommand=function(self)
self:stoptweening();
self:accelerate(0.25);
self:zoom(squareSize);
self:rotationz(45);
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:decelerate(0.25);
self:zoom(0);
self:rotationz(360+45);
end;
}; };
LoadFont("Common Normal") .. { LoadFont("Common Normal") .. {
Text=gc:GetText(); Text=gc:GetText();
InitCommand=cmd(halign,0;zoom,0.625); InitCommand=function(self)
GainFocusCommand=cmd(stoptweening;decelerate,0.25;diffuse,color("1,1,1,1")); self:halign(0);
LoseFocusCommand=cmd(stoptweening;accelerate,0.25;diffuse,color("0.5,0.5,0.5,1")); self:zoom(0.625);
end;
GainFocusCommand=function(self)
self:stoptweening();
self:decelerate(0.25);
self:diffuse(color("1,1,1,1"));
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:accelerate(0.25);
self:diffuse(color("0.5,0.5,0.5,1"));
end;
}; };
}; };
@@ -1,10 +1,33 @@
return LoadFont("Common Normal") .. { return LoadFont("Common Normal") .. {
Text=ScreenString("Exit"); Text=ScreenString("Exit");
InitCommand=cmd(x,SCREEN_CENTER_X;zoom,0.75;shadowlength,0;diffuse,color("#880000");NoStroke); 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("#880000"));
self:NoStroke();
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;effectcolor1,color("#FF2222");effectcolor2,color("#880000");); GainFocusCommand=function(self)
LoseFocusCommand=cmd(stopeffect); self:diffuseshift();
self:effectcolor1(color("#FF2222"));
self:effectcolor2(color("#880000"));
end;
LoseFocusCommand=function(self)
self:stopeffect();
end;
}; };
@@ -5,32 +5,80 @@ local c = {};
local t = Def.ActorFrame {}; local t = Def.ActorFrame {};
t[#t+1] = Def.ActorFrame { t[#t+1] = Def.ActorFrame {
Condition=( gc:GetName() ~= "Back" ); Condition=( gc:GetName() ~= "Back" );
InitCommand=cmd(x,c.X;y,c.Y); InitCommand=function(self)
GainFocusCommand=cmd(finishtweening;zoom,1.125;bounceend,0.125;zoom,1); self:x(c.X);
LoseFocusCommand=cmd(stoptweening;linear,0.125;zoom,0.875); self:y(c.Y);
end;
GainFocusCommand=function(self)
self:finishtweening();
self:zoom(1.125);
self:bounceend(0.125);
self:zoom(1);
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:linear(0.125);
self:zoom(0.875);
LoadActor("_base") .. { LoadActor("_base") .. {
GainFocusCommand=cmd(stoptweening;linear,0.125;diffuse,Color("Orange");diffusetopedge,Color("Yellow")); GainFocusCommand=function(self)
LoseFocusCommand=cmd(stoptweening;linear,0.125;diffuse,Color("White")); self:stoptweening();
self:linear(0.125);
self:diffuse(Color("Orange"));
self:diffusetopedge(Color("Yellow"));
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:linear(0.125);
self:diffuse(Color("White"));
end;
}; };
LoadFont("Common Normal") .. { LoadFont("Common Normal") .. {
Text=gc:GetName(); Text=gc:GetName();
InitCommand=cmd(strokecolor,Color("White")); InitCommand=function(self)
OnCommand=cmd(diffuse,Color("Black")); self:strokecolor(Color("White"));
end;
OnCommand=function(self)
self:diffuse(Color("Black"));
end;
}; };
}; };
t[#t+1] = Def.ActorFrame { t[#t+1] = Def.ActorFrame {
Condition=( gc:GetName() == "Back" ); Condition=( gc:GetName() == "Back" );
InitCommand=cmd(x,c.X;y,c.Y); InitCommand=function(self)
GainFocusCommand=cmd(finishtweening;zoom,1.125;bounceend,0.125;zoom,1); self:x(c.X);
LoseFocusCommand=cmd(stoptweening;linear,0.125;zoom,0.875); self:y(c.Y);
end;
GainFocusCommand=function(self)
self:finishtweening();
self:zoom(1.125);
self:bounceend(0.125);
self:zoom(1);
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:linear(0.125);
self:zoom(0.875);
end;
LoadActor("_base") .. { LoadActor("_base") .. {
GainFocusCommand=cmd(stoptweening;linear,0.125;diffuse,Color("Red")); GainFocusCommand=function(self)
LoseFocusCommand=cmd(stoptweening;linear,0.125;diffuse,Color("White")); self:stoptweening();
self:linear(0.125);
self:diffuse(Color("Red"));
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:linear(0.125);
self:diffuse(Color("White"));
end;
}; };
LoadFont("Common Normal") .. { LoadFont("Common Normal") .. {
Text=gc:GetName(); Text=gc:GetName();
InitCommand=cmd(strokecolor,Color("White")); InitCommand=function(self)
OnCommand=cmd(diffuse,Color("Black")); self:strokecolor(Color("White"));
end;
OnCommand=function(self)
self:diffuse(Color("Black"));
end;
}; };
}; };
@@ -1,43 +1,61 @@
return Def.CourseContentsList { return Def.CourseContentsList {
MaxSongs = 4; MaxSongs = 4;
NumItemsToDraw = 8; -- xxx: Doesn't scroll anymore. NumItemsToDraw = 8; -- xxx: Doesn't scroll anymore.
--[[ InitCommand=cmd(x,SCREEN_CENTER_X+160;y,SCREEN_CENTER_Y+91); ShowCommand=function(self)
OnCommand=cmd(zoomy,0;bounceend,0.3;zoom,1); self:bouncebegin(0.3);
OffCommand=cmd(zoomy,1;bouncebegin,0.3;zoomy,0); --]] self:zoomy(1);
ShowCommand=cmd(bouncebegin,0.3;zoomy,1); end;
HideCommand=cmd(linear,0.3;zoomy,0); HideCommand=function(self)
self:linear(0.3);
self:zoomy(0);
end;
SetCommand=function(self) SetCommand=function(self)
self:SetFromGameState(); self:SetFromGameState();
self:PositionItems(); self:PositionItems();
self:SetTransformFromHeight(44); self:SetTransformFromHeight(44);
self:SetCurrentAndDestinationItem(0); self:SetCurrentAndDestinationItem(0);
-- self:SetDestinationItem( self:GetNumItems()-2 );
self:SetLoop(false); self:SetLoop(false);
self:SetMask(270,0); self:SetMask(270,0);
end; end;
CurrentTrailP1ChangedMessageCommand=cmd(playcommand,"Set"); CurrentTrailP1ChangedMessageCommand=function(self)
CurrentTrailP2ChangedMessageCommand=cmd(playcommand,"Set"); self:playcommand("Set");
end;
CurrentTrailP2ChangedMessageCommand=function(self)
self:playcommand("Set");
end;
Display = Def.ActorFrame { Display = Def.ActorFrame {
InitCommand=cmd(setsize,270,44); InitCommand=function(self)
self:setsize(270,44);
end;
LoadActor(THEME:GetPathG("CourseEntryDisplay","bar")) .. { LoadActor(THEME:GetPathG("CourseEntryDisplay","bar")) .. {
-- InitCommand=cmd(diffusetopedge,Color("Invisible"));
SetSongCommand=function(self, params) SetSongCommand=function(self, params)
if params.Difficulty then if params.Difficulty then
-- self:diffuse( SONGMAN:GetSongColor(params.Song) );
self:diffuse( CustomDifficultyToColor(params.Difficulty) ); self:diffuse( CustomDifficultyToColor(params.Difficulty) );
else else
self:diffuse( color("#FFFFFF") ); self:diffuse( color("#FFFFFF") );
-- self:diffuse( CustomDifficultyToColor(params.Difficulty) );
end end
(cmd(finishtweening;diffusealpha,0;sleep,0.125*params.Number;linear,0.125;diffusealpha,1;linear,0.05;glow,color("1,1,1,0.5");decelerate,0.1;glow,color("1,1,1,0")))(self); self:finishtweening();
self:diffusealpha(0);
self:sleep(0.125 * params.Number);
self:linear(0.125);
self:diffusealpha(1);
self:linear(0.05);
self:glow(color("1,1,1,0.5"));
self:decelerate(0.1);
self:glow(color("1,1,1,0"));
end; end;
}; };
Def.TextBanner { Def.TextBanner {
InitCommand=cmd(x,-128;y,1;Load,"TextBanner";SetFromString,"", "", "", "", "", ""); InitCommand=function(self)
self:x(-128);
self:y(1);
self:Load("TextBanner");
self:SetFromString("", "", "", "", "", "");
end;
SetSongCommand=function(self, params) SetSongCommand=function(self, params)
if params.Song then if params.Song then
if GAMESTATE:GetCurrentCourse():GetDisplayFullTitle() == "Abomination" then if GAMESTATE:GetCurrentCourse():GetDisplayFullTitle() == "Abomination" then
@@ -57,48 +75,45 @@ return Def.CourseContentsList {
self:SetFromSong( params.Song ); self:SetFromSong( params.Song );
end; end;
self:diffuse( CustomDifficultyToColor(params.Difficulty) ); self:diffuse( CustomDifficultyToColor(params.Difficulty) );
-- self:glow("1,1,1,0.5");
else else
self:SetFromString( "??????????", "??????????", "", "", "", "" ); self:SetFromString( "??????????", "??????????", "", "", "", "" );
self:diffuse( color("#FFFFFF") ); self:diffuse( color("#FFFFFF") );
-- self:glow("1,1,1,0");
end end
(cmd(finishtweening;zoomy,0;sleep,0.125*params.Number;linear,0.125;zoomy,1.1;linear,0.05;zoomx,1.1;decelerate,0.1;zoom,1))(self); self:finishtweening();
self:zoomy(0);
self:sleep(0.125 * params.Number);
self:linear(0.125);
self:zoomy(1.1);
self:linear(0.05);
self:zoomx(1.1);
self:decelerate(0.1);
self:zoom(1);
end; end;
}; };
--[[ LoadFont("CourseEntryDisplay","number") .. {
InitCommand=cmd(x,114+8;y,-12;shadowlength,1);
SetSongCommand=function(self, params)
self:settext(string.format("#%i", params.Number));
(cmd(finishtweening;zoom,0.5;zoomy,0.5*1.5;diffusealpha,0;sleep,0.125*params.Number;linear,0.125;diffusealpha,1;linear,0.05;zoomy,0.5*1;zoomx,0.5*1.1;glow,color("1,1,1,0.5");decelerate,0.1;zoom,0.5;glow,color("1,1,1,0")))(self);
end;
}; --]]
LoadFont("CourseEntryDisplay","difficulty") .. { LoadFont("CourseEntryDisplay","difficulty") .. {
Text="0"; Text="0";
InitCommand=cmd(x,114;y,0;zoom,0.75;shadowlength,1); InitCommand=function(self)
self:x(114);
self:y(0);
self:zoom(0.75);
self:shadowlength(1);
end;
SetSongCommand=function(self, params) SetSongCommand=function(self, params)
if params.PlayerNumber ~= GAMESTATE:GetMasterPlayerNumber() then return end if params.PlayerNumber ~= GAMESTATE:GetMasterPlayerNumber() then return end
self:settext( params.Meter ); self:settext( params.Meter );
self:diffuse( CustomDifficultyToColor(params.Difficulty) ); self:diffuse( CustomDifficultyToColor(params.Difficulty) );
(cmd(finishtweening;zoomy,0;sleep,0.125*params.Number;linear,0.125;zoomy,1.1;linear,0.05;zoomx,1.1;decelerate,0.1;zoom,1))(self); self:finishtweening();
self:zoomy(0);
self:sleep(0.125 * params.Number);
self:linear(0.125);
self:zoomy(1.1);
self:linear(0.05);
self:zoomx(1.1);
self:decelerate(0.1);
self:zoom(1);
end; end;
}; };
--[[ LoadFont("Common","normal") .. {
OnCommand=cmd(x,0;y,-8;zoom,0.7;shadowlength,0);
DifficultyChangedCommand=function(self, params)
if params.PlayerNumber ~= GAMESTATE:GetMasterPlayerNumber() then return end
self:settext( params.Meter );
self:diffuse( CourseDifficultyColors[params.Difficulty] );
end;
}; --]]
--[[ LoadFont("Common","normal") .. {
OnCommand=cmd(x,SCREEN_CENTER_X-192;y,SCREEN_CENTER_Y-230;horizalign,right;shadowlength,0);
SetSongCommand=function(self, params) self:settext(params.Modifiers); end;
}; --]]
}; };
}; };
@@ -60,20 +60,45 @@ for idx,diff in pairs(Difficulty) do
c.Meter:settext( meter ); c.Meter:settext( meter );
self:playcommand( bHasStepsTypeAndDifficulty and "Show" or "Hide" ); self:playcommand( bHasStepsTypeAndDifficulty and "Show" or "Hide" );
end; end;
CurrentSongChangedMessageCommand=cmd(playcommand,"Set"); CurrentSongChangedMessageCommand=function(self)
self:playcommand("Set");
end;
-- --
LoadActor("_barpeice " .. sDifficulty ) .. { LoadActor("_barpeice " .. sDifficulty ) .. {
Name="BarPeice"; Name="BarPeice";
ShowCommand=cmd(stoptweening;linear,0.1;diffuse,CustomDifficultyToColor( sDifficulty )); ShowCommand=function(self)
HideCommand=cmd(stoptweening;decelerate,0.05;diffuse,CustomDifficultyToDarkColor( sDifficulty )); self:stoptweening();
InitCommand=cmd(diffuse,CustomDifficultyToColor( sDifficulty )); self:linear(0.1);
self:diffuse(CustomDifficultyToColor( sDifficulty ));
end;
HideCommand=function(self)
self:stoptweening();
self:decelerate(0.05);
self:diffuse(CustomDifficultyToDarkColor( sDifficulty ));
end;
InitCommand=function(self)
self:diffuse(CustomDifficultyToColor( sDifficulty ));
end;
}; };
LoadFont("StepsDisplay","Meter") .. { LoadFont("StepsDisplay","Meter") .. {
Name="Meter"; Name="Meter";
Text=(sDifficulty == "Edit") and "0 Edits" or "0"; Text=(sDifficulty == "Edit") and "0 Edits" or "0";
ShowCommand=cmd(stoptweening;linear,0.1;diffuse,CustomDifficultyToColor( sDifficulty )); ShowCommand=function(self)
HideCommand=cmd(stoptweening;decelerate,0.05;diffuse,CustomDifficultyToDarkColor( sDifficulty )); self:stoptweening();
InitCommand=cmd(x,-64-8+tLocation[sDifficulty];shadowlength,1;zoom,0.75;diffuse,CustomDifficultyToColor( sDifficulty )); self:linear(0.1);
self:diffuse(CustomDifficultyToColor( sDifficulty ));
end;
HideCommand=function(self)
self:stoptweening();
self:decelerate(0.05);
self:diffuse(CustomDifficultyToDarkColor( sDifficulty ));
end;
InitCommand=function(self)
self:x(-64 - 8 + tLocation[sDifficulty]);
self:shadowlength(1);
self:zoom(0.75);
self:diffuse(CustomDifficultyToColor( sDifficulty ));
end;
}; };
}; };
end end
@@ -2,85 +2,157 @@ return Def.ActorFrame {
CurrentSongChangedMessageCommand=function(self) CurrentSongChangedMessageCommand=function(self)
local song = GAMESTATE:GetCurrentSong(); local song = GAMESTATE:GetCurrentSong();
if song then if song then
-- self:setaux(0);
self:finishtweening(); self:finishtweening();
self:playcommand("TweenOn"); self:playcommand("TweenOn");
elseif not song and self:GetZoomX() == 1 then elseif not song and self:GetZoomX() == 1 then
-- self:setaux(1);
self:finishtweening(); self:finishtweening();
self:playcommand("TweenOff"); self:playcommand("TweenOff");
end; end;
end; end;
Def.Quad { Def.Quad {
InitCommand=cmd(y,-14;zoomto,164,2;fadeleft,8/164;faderight,8/164); InitCommand=function(self)
OnCommand=cmd(diffuse,Color("Black");diffusealpha,0;linear,0.35;diffusealpha,0.5); self:y(-14);
self:zoomto(164, 2);
self:fadeleft(8 / 164);
self:faderight(8 / 164);
end;
OnCommand=function(self)
self:diffuse(Color("Black"));
self:diffusealpha(0);
self:linear(0.35);
self:diffusealpha(0.5);
end;
}; };
Def.Quad { Def.Quad {
InitCommand=cmd(y,24*(5)-10;zoomto,164,2;fadeleft,8/164;faderight,8/164); InitCommand=function(self)
OnCommand=cmd(diffuse,Color("Black");diffusealpha,0;linear,0.35;diffusealpha,0.5); self:y(24 * 5 - 10);
self:zoomto(164, 2);
self:fadeleft(8 / 164);
self:faderight(8 / 164);
end;
OnCommand=function(self)
self:diffuse(Color("Black"));
self:diffusealpha(0);
self:linear(0.35);
self:diffusealpha(0.5);
end;
}; };
Def.StepsDisplayList { Def.StepsDisplayList {
Name="StepsDisplayListRow"; Name="StepsDisplayListRow";
CursorP1 = Def.ActorFrame { CursorP1 = Def.ActorFrame {
InitCommand=cmd(x,-128+16;player,PLAYER_1); InitCommand=function(self)
self:x(-128 + 16);
self:player(PLAYER_1);
end;
PlayerJoinedMessageCommand=function(self, params) PlayerJoinedMessageCommand=function(self, params)
if params.Player == PLAYER_1 then if params.Player == PLAYER_1 then
self:visible(true); self:visible(true);
(cmd(zoom,0;bounceend,1;zoom,1))(self); self:zoom(0);
self:bounceend(1);
self:zoom(1);
end; end;
end; end;
PlayerUnjoinedMessageCommand=function(self, params) PlayerUnjoinedMessageCommand=function(self, params)
if params.Player == PLAYER_1 then if params.Player == PLAYER_1 then
self:visible(true); self:visible(true);
(cmd(bouncebegin,1;zoom,0))(self); self:bouncebegin(1);
self:zoom(0);
end; end;
end; end;
LoadActor(THEME:GetPathG("_StepsDisplayListRow","Cursor")) .. { LoadActor(THEME:GetPathG("_StepsDisplayListRow","Cursor")) .. {
InitCommand=cmd(diffuse,PlayerColor(PLAYER_1);x,8;zoom,0.75); InitCommand=function(self)
self:diffuse(PlayerColor(PLAYER_1));
self:x(8);
self:zoom(0.75);
end;
}; };
LoadActor(THEME:GetPathG("_StepsDisplayListRow","arrow")) .. { LoadActor(THEME:GetPathG("_StepsDisplayListRow","arrow")) .. {
InitCommand=cmd(x,20;diffuse,PlayerColor(PLAYER_1)); InitCommand=function(self)
OnCommand=cmd(thump,1;effectmagnitude,1,1.25,1;effectclock,'beat';); self:x(20);
self:diffuse(PlayerColor(PLAYER_1));
end;
OnCommand=function(self)
self:thump(1);
self:effectmagnitude(1, 1.25, 1);
self:effectclock('beat');
end;
}; };
LoadFont("Common Normal") .. { LoadFont("Common Normal") .. {
Text="P1"; Text="P1";
InitCommand=cmd(x,2;diffuse,PlayerColor(PLAYER_1);shadowlength,1); InitCommand=function(self)
OnCommand=cmd(zoom,0.75); self:x(2);
self:diffuse(PlayerColor(PLAYER_1));
self:shadowlength(1);
end;
OnCommand=function(self)
self:zoom(0.75);
end;
}; };
}; };
CursorP2 = Def.ActorFrame { CursorP2 = Def.ActorFrame {
InitCommand=cmd(x,128-16;player,PLAYER_2); InitCommand=function(self)
self:x(128 - 16);
self:player(PLAYER_2);
end;
PlayerJoinedMessageCommand=function(self, params) PlayerJoinedMessageCommand=function(self, params)
if params.Player == PLAYER_2 then if params.Player == PLAYER_2 then
self:visible(true); self:visible(true);
(cmd(zoom,0;bounceend,1;zoom,1))(self); self:zoom(0);
self:bounceend(1);
self:zoom(1);
end; end;
end; end;
PlayerUnjoinedMessageCommand=function(self, params) PlayerUnjoinedMessageCommand=function(self, params)
if params.Player == PLAYER_2 then if params.Player == PLAYER_2 then
self:visible(true); self:visible(true);
(cmd(bouncebegin,1;zoom,0))(self); self:bouncebegin(1);
self:zoom(0);
end; end;
end; end;
LoadActor(THEME:GetPathG("_StepsDisplayListRow","Cursor")) .. { LoadActor(THEME:GetPathG("_StepsDisplayListRow","Cursor")) .. {
InitCommand=cmd(diffuse,PlayerColor(PLAYER_2);x,-8;zoom,0.75;zoomx,-0.75;); InitCommand=function(self)
self:diffuse(PlayerColor(PLAYER_2));
self:x(-8);
self:zoom(0.75);
self:zoomx(-0.75);
end;
}; };
LoadActor(THEME:GetPathG("_StepsDisplayListRow","arrow")) .. { LoadActor(THEME:GetPathG("_StepsDisplayListRow","arrow")) .. {
InitCommand=cmd(x,-20;diffuse,PlayerColor(PLAYER_2);zoomx,-1); InitCommand=function(self)
OnCommand=cmd(thump,1;effectmagnitude,1,1.25,1;effectclock,'beat';); self:x(-20);
self:diffuse(PlayerColor(PLAYER_2));
self:zoomx(-1);
end;
OnCommand=function(self)
self:thump(1);
self:effectmagnitude(1, 1.25, 1);
self:effectclock('beat');
end;
}; };
LoadFont("Common Normal") .. { LoadFont("Common Normal") .. {
Text="P2"; Text="P2";
InitCommand=cmd(x,-2;diffuse,PlayerColor(PLAYER_2);shadowlength,1); InitCommand=function(self)
OnCommand=cmd(zoom,0.75); self:x(-2);
self:diffuse(PlayerColor(PLAYER_2));
self:shadowlength(1);
end;
OnCommand=function(self)
self:zoom(0.75);
end;
}; };
}; };
CursorP1Frame = Def.Actor{ CursorP1Frame = Def.Actor{
ChangeCommand=cmd(stoptweening;decelerate,0.05); ChangeCommand=function(self)
self:stoptweening();
self:decelerate(0.05);
end;
}; };
CursorP2Frame = Def.Actor{ CursorP2Frame = Def.Actor{
ChangeCommand=cmd(stoptweening;decelerate,0.05); ChangeCommand=function(self)
self:stoptweening();
self:decelerate(0.05);
end;
}; };
}; };
}; };
@@ -3,8 +3,16 @@ local iconPath = "_timingicons"
local leftColX = -144 local leftColX = -144
local rightColX = -leftColX local rightColX = -leftColX
local showCmd = cmd(stoptweening;accelerate,0.1;diffusealpha,1) local showCmd = function(self)
local hideCmd = cmd(stoptweening;accelerate,0.1;diffusealpha,0) self:stoptweening();
self:accelerate(0.1);
self:diffusealpha(1);
end;
local hideCmd = function(self)
self:stoptweening();
self:accelerate(0.1);
self:diffusealpha(0);
end;
local SegmentTypes = { local SegmentTypes = {
Stops = { Frame = 0, xPos = leftColX, yPos = 0 }, Stops = { Frame = 0, xPos = leftColX, yPos = 0 },
@@ -17,8 +25,10 @@ local SegmentTypes = {
}; };
local t = Def.ActorFrame{ local t = Def.ActorFrame{
BeginCommand=cmd(playcommand,"SetIcons";playcommand,"SetAttacksIconMessage"); BeginCommand=function(self)
--OffCommand=cmd( RunCommandsOnChildren,cmd(playcommand,"Hide") ); self:playcommand("SetIcons");
self:playcommand("SetAttacksIconMessage");
end;
SetIconsCommand=function(self) SetIconsCommand=function(self)
local stops = self:GetChild("StopsIcon") local stops = self:GetChild("StopsIcon")
@@ -85,47 +95,91 @@ local t = Def.ActorFrame{
LoadActor(iconPath)..{ LoadActor(iconPath)..{
Name="WarpsIcon"; Name="WarpsIcon";
InitCommand=cmd(animate,false;x,SegmentTypes.Warps.xPos;y,SegmentTypes.Warps.yPos;setstate,SegmentTypes.Warps.Frame;diffusealpha,0); InitCommand=function(self)
self:animate(false);
self:x(SegmentTypes.Warps.xPos);
self:y(SegmentTypes.Warps.yPos);
self:setstate(SegmentTypes.Warps.Frame);
self:diffusealpha(0);
end;
ShowCommand=showCmd; ShowCommand=showCmd;
HideCommand=hideCmd; HideCommand=hideCmd;
}; };
LoadActor(iconPath)..{ LoadActor(iconPath)..{
Name="StopsIcon"; Name="StopsIcon";
InitCommand=cmd(animate,false;x,SegmentTypes.Stops.xPos;y,SegmentTypes.Stops.yPos;setstate,SegmentTypes.Stops.Frame;diffusealpha,0); InitCommand=function(self)
self:animate(false);
self:x(SegmentTypes.Stops.xPos);
self:y(SegmentTypes.Stops.yPos);
self:setstate(SegmentTypes.Stops.Frame);
self:diffusealpha(0);
end;
ShowCommand=showCmd; ShowCommand=showCmd;
HideCommand=hideCmd; HideCommand=hideCmd;
}; };
LoadActor(iconPath)..{ LoadActor(iconPath)..{
Name="DelaysIcon"; Name="DelaysIcon";
InitCommand=cmd(animate,false;x,SegmentTypes.Delays.xPos;y,SegmentTypes.Delays.yPos;setstate,SegmentTypes.Delays.Frame;diffusealpha,0); InitCommand=function(self)
self:animate(false);
self:x(SegmentTypes.Delays.xPos);
self:y(SegmentTypes.Delays.yPos);
self:setstate(SegmentTypes.Delays.Frame);
self:diffusealpha(0);
end;
ShowCommand=showCmd; ShowCommand=showCmd;
HideCommand=hideCmd; HideCommand=hideCmd;
}; };
LoadActor(iconPath)..{ LoadActor(iconPath)..{
Name="AttacksIcon"; Name="AttacksIcon";
InitCommand=cmd(animate,false;x,SegmentTypes.Attacks.xPos;y,SegmentTypes.Attacks.yPos;setstate,SegmentTypes.Attacks.Frame;diffusealpha,0); InitCommand=function(self)
self:animate(false);
self:x(SegmentTypes.Attacks.xPos);
self:y(SegmentTypes.Attacks.yPos);
self:setstate(SegmentTypes.Attacks.Frame);
self:diffusealpha(0);
end;
ShowCommand=showCmd; ShowCommand=showCmd;
HideCommand=hideCmd; HideCommand=hideCmd;
}; };
LoadActor(iconPath)..{ LoadActor(iconPath)..{
Name="ScrollsIcon"; Name="ScrollsIcon";
InitCommand=cmd(animate,false;x,SegmentTypes.Scrolls.xPos;y,SegmentTypes.Scrolls.yPos;setstate,SegmentTypes.Scrolls.Frame;diffusealpha,0); InitCommand=function(self)
self:animate(false);
self:x(SegmentTypes.Scrolls.xPos);
self:y(SegmentTypes.Scrolls.yPos);
self:setstate(SegmentTypes.Scrolls.Frame);
self:diffusealpha(0);
end;
ShowCommand=showCmd; ShowCommand=showCmd;
HideCommand=hideCmd; HideCommand=hideCmd;
}; };
LoadActor(iconPath)..{ LoadActor(iconPath)..{
Name="SpeedsIcon"; Name="SpeedsIcon";
InitCommand=cmd(animate,false;x,SegmentTypes.Speeds.xPos;y,SegmentTypes.Speeds.yPos;setstate,SegmentTypes.Speeds.Frame;diffusealpha,0); InitCommand=function(self)
self:animate(false);
self:x(SegmentTypes.Speeds.xPos);
self:y(SegmentTypes.Speeds.yPos);
self:setstate(SegmentTypes.Speeds.Frame);
self:diffusealpha(0);
end;
ShowCommand=showCmd; ShowCommand=showCmd;
HideCommand=hideCmd; HideCommand=hideCmd;
}; };
LoadActor(iconPath)..{ LoadActor(iconPath)..{
Name="FakesIcon"; Name="FakesIcon";
InitCommand=cmd(animate,false;x,SegmentTypes.Fakes.xPos;y,SegmentTypes.Fakes.yPos;setstate,SegmentTypes.Fakes.Frame;diffusealpha,0); function(self)
self:animate(false);
self:x(SegmentTypes.Fakes.xPos);
self:y(SegmentTypes.Fakes.yPos);
self:setstate(SegmentTypes.Fales.Frame);
self:diffusealpha(0);
end;
ShowCommand=showCmd; ShowCommand=showCmd;
HideCommand=hideCmd; HideCommand=hideCmd;
}; };
CurrentSongChangedMessageCommand=cmd(playcommand,"SetIcons";); CurrentSongChangedMessageCommand=function(self)
self:playcommand("SetIcons");
end;
CurrentStepsP1ChangedMessageCommand=function(self) MESSAGEMAN:Broadcast("SetAttacksIcon",{Player = PLAYER_1}) end; CurrentStepsP1ChangedMessageCommand=function(self) MESSAGEMAN:Broadcast("SetAttacksIcon",{Player = PLAYER_1}) end;
CurrentStepsP2ChangedMessageCommand=function(self) MESSAGEMAN:Broadcast("SetAttacksIcon",{Player = PLAYER_2}) end; CurrentStepsP2ChangedMessageCommand=function(self) MESSAGEMAN:Broadcast("SetAttacksIcon",{Player = PLAYER_2}) end;
}; };
@@ -1,11 +1,24 @@
local gc = Var("GameCommand"); local gc = Var("GameCommand");
local t = Def.ActorFrame {}; local t = Def.ActorFrame {};
t[#t+1] = Def.ActorFrame { t[#t+1] = Def.ActorFrame {
GainFocusCommand=cmd(stoptweening;bob;effectmagnitude,0,6,0;decelerate,0.05;zoom,1); GainFocusCommand=function(self)
LoseFocusCommand=cmd(stoptweening;stopeffect;decelerate,0.1;zoom,0.6); self:stoptweening();
self:bob(); -- the heck is this?
self:effectmagnitude(0, 6, 0);
self:decelerate(0.05);
self:zoom(1);
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:stopeffect();
self:decelerate(0.1);
self:zoom(0.6);
end;
LoadActor("_background base")..{ LoadActor("_background base")..{
InitCommand=cmd(diffuse,ModeIconColors[gc:GetName()]); InitCommand=function(self)
self:diffuse(ModeIconColors[gc:GetName()]);
end;
}; };
LoadActor("_background effect"); LoadActor("_background effect");
LoadActor("_gloss"); LoadActor("_gloss");
@@ -14,24 +27,46 @@ t[#t+1] = Def.ActorFrame {
-- todo: generate a better font for these. -- todo: generate a better font for these.
LoadFont("_helveticaneuelt std extblk cn 42px")..{ LoadFont("_helveticaneuelt std extblk cn 42px")..{
InitCommand=cmd(y,-12;zoom,1.1;diffuse,color("#000000");uppercase,true;settext,gc:GetText();); InitCommand=function(self)
GainFocusCommand=cmd(diffuse,Color.Black;stopeffect); self:y(-12);
LoseFocusCommand=cmd(diffuse,Color.Black;stopeffect); self:zoom(1.1);
self:diffuse(color("#000000"));
self:uppercase(true);
self:settext(gc:GetText());
end;
GainFocusCommand=function(self)
self:diffuse(Color.Black);
self:stopeffect();
end;
LoseFocusCommand=function(self)
self:diffuse(Color.Black);
self:stopeffect();
end;
}; };
LoadFont("_helveticaneuelt std extblk cn 42px")..{ LoadFont("_helveticaneuelt std extblk cn 42px")..{
InitCommand=cmd(y,27.5;zoom,0.45;maxwidth,320*1.6;uppercase,true;settext,THEME:GetString(Var "LoadingScreen", gc:GetName().."Explanation")); InitCommand=function(self)
GainFocusCommand=cmd(diffuse,Color.White;stopeffect); self:y(27.5);
LoseFocusCommand=cmd(diffuse,Color.White;stopeffect); self:zoom(0.45);
self:maxwidth(320 * 1.6);
self:uppercase(true);
self:settext(THEME:GetString(Var "LoadingScreen", gc:GetName().."Explanation"));
end;
GainFocusCommand=function(self)
self:diffuse(Color.White);
self:stopeffect();
end;
LoseFocusCommand=function(self)
self:diffuse(Color.White);
self:stopeffect();
end;
}; };
LoadActor("_background base") .. { LoadActor("_background base") .. {
DisabledCommand=cmd(diffuse,color("0,0,0,0.5")); DisabledCommand=function(self)
EnabledCommand=cmd(diffuse,color("1,1,1,0")); self:diffuse(color("0,0,0,0.5"));
end;
EnabledCommand=function(self)
self:diffuse(color("1,1,1,0"));
end;
}; };
--[[
LoadActor(THEME:GetPathG("_SelectIcon",gc:GetName() )) .. {
DisabledCommand=cmd(diffuse,color("0.5,0.5,0.5,1"));
EnabledCommand=cmd(diffuse,color("1,1,1,1"));
};
--]]
}; };
return t return t
@@ -12,57 +12,213 @@ local t = Def.ActorFrame {};
-- Background! -- Background!
t[#t+1] = Def.ActorFrame { t[#t+1] = Def.ActorFrame {
LoadActor(THEME:GetPathG("ScreenSelectPlayMode","BackgroundFrame")) .. { LoadActor(THEME:GetPathG("ScreenSelectPlayMode","BackgroundFrame")) .. {
InitCommand=cmd(diffuse,Color("Black");diffusealpha,0.7); InitCommand=function(self)
GainFocusCommand=cmd(visible,true); self:diffuse(Color("Black"));
LoseFocusCommand=cmd(visible,false); self:diffusealpha(0.7);
end;
GainFocusCommand=function(self)
self:visible(true);
end;
LoseFocusCommand=function(self)
self:visible(false);
end;
}; };
LoadActor("_HighlightFrame") .. { LoadActor("_HighlightFrame") .. {
InitCommand=cmd(diffuse,ModeIconColors[gc:GetName()];diffusealpha,0); InitCommand=function(self)
GainFocusCommand=cmd(finishtweening;diffusealpha,1;glow,Color.Alpha(Color.White,1);linear,0.1;glow,Color.Invisible); self:diffuse(ModeIconColors[gc:GetName()]);
LoseFocusCommand=cmd(finishtweening;diffusealpha,0;glow,Color.Invisible); self:diffusealpha(0);
OffFocusedCommand=cmd(finishtweening;glow,Color("White");decelerate,1;glow,Color("Invisible")); end;
GainFocusCommand=function(self)
self:finishtweening();
self:diffusealpha(1);
self:glow(Color.Alpha(Color.White,1));
self:linear(0.1);
self:glow(Color.Invisible);
end;
LoseFocusCommand=function(self)
self:finishtweening();
self:diffusealpha(0);
self:glow(Color.Invisible);
end;
OffFocusedCommand=function(self)
self:finishtweening();
self:glow(Color("White"));
self:decelerate(1);
self:glow(Color("Invisible"));
end;
}; };
}; };
-- Emblem Frame -- Emblem Frame
t[#t+1] = Def.ActorFrame { t[#t+1] = Def.ActorFrame {
FOV=90; FOV=90;
InitCommand=cmd(x,-192;zoom,0.9); InitCommand=function(self)
self:x(-192);
self:zoom(0.9);
end;
-- Main Shadow -- Main Shadow
LoadActor( gc:GetName() ) .. { LoadActor( gc:GetName() ) .. {
InitCommand=cmd(x,2;y,2;diffuse,Color("Black");diffusealpha,0;zoom,0.75); InitCommand=function(self)
GainFocusCommand=cmd(stoptweening;stopeffect;smooth,0.1;diffusealpha,0;zoom,1;decelerate,0.05;diffusealpha,0.5;pulse;effecttiming,0.75,0.125,0.125,0.75;effectmagnitude,0.95,1,1;); self:x(2);
LoseFocusCommand=cmd(stoptweening;stopeffect;smooth,0.2;diffusealpha,0;zoom,0.75;); self:y(2);
OffFocusedCommand=cmd(finishtweening;stopeffect;glow,ModeIconColors[gc:GetName()];decelerate,0.5;rotationy,360;); self:diffuse(Color("Black"));
self:diffusealpha(0);
self:zoom(0.75);
end;
GainFocusCommand=function(self)
self:stoptweening();
self:stopeffect();
self:smooth(0.1);
self:diffusealpha(0);
self:zoom(1);
self:decelerate(0.05);
self:diffusealpha(0.5);
self:pulse();
self:effecttiming(0.75, 0.125, 0.125, 0.75);
self:effectmagnitude(0.95, 1, 1);
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:stopeffect();
self:smooth(0.2);
self:diffusealpha(0);
self:zoom(0.75);
end;
OffFocusedCommand=function(self)
self:finishtweening();
self:stopeffect();
self:glow(ModeIconColors[gc:GetName()]);
self:decelerate(0.5);
self:rotationy(360);
end;
}; };
-- Main Emblem -- Main Emblem
LoadActor( gc:GetName() ) .. { LoadActor( gc:GetName() ) .. {
InitCommand=cmd(diffusealpha,0;zoom,0.75); InitCommand=function(self)
GainFocusCommand=cmd(stoptweening;stopeffect;smooth,0.1;diffusealpha,1;zoom,1;glow,Color("White");decelerate,0.05;glow,Color("Invisible");pulse;effecttiming,0.75,0.125,0.125,0.75;effectmagnitude,0.95,1,1;); self:diffusealpha(0);
LoseFocusCommand=cmd(stoptweening;stopeffect;smooth,0.2;diffusealpha,0;zoom,0.75;glow,Color("Invisible")); self:zoom(0.75);
OffFocusedCommand=cmd(finishtweening;stopeffect;glow,ModeIconColors[gc:GetName()];decelerate,0.5;rotationy,360;glow,Color("Invisible")); end;
GainFocusCommand=function(self)
self:stoptweening();
self:stopeffect();
self:smooth(0.1);
self:diffusealpha(1);
self:zoom(1);
self:glow(Color("White"));
self:decelerate(0.05);
self:glow(Color("Invisible"));
self:pulse();
self:effecttiming(0.75, 0.125, 0.125, 0.75);
self:effectmagnitude(0.95, 1, 1);
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:stopeffect();
self:smooth(0.2);
self:diffusealpha(0);
self:zoom(0.75);
self:glow(Color("Invisible"));
end;
OffFocusedCommand=function(self)
self:finishtweening();
self:stopeffect();
self:glow(ModeIconColors[gc:GetName()]);
self:decelerate(0.5);
self:rotationy(360);
self:glow(Color("Invisible"));
end;
}; };
}; };
-- Text Frame -- Text Frame
t[#t+1] = Def.ActorFrame { t[#t+1] = Def.ActorFrame {
InitCommand=cmd(x,-192/2;y,-10); InitCommand=function(self)
self:x(-192/2);
self:y(-10);
end;
Def.Quad { Def.Quad {
InitCommand=cmd(horizalign,left;y,20;zoomto,320,2;diffuse,ModeIconColors[gc:GetName()];diffusealpha,0;fadeleft,0.35;faderight,0.35); InitCommand=function(self)
GainFocusCommand=cmd(stoptweening;linear,0.1;diffusealpha,1); self:horizalign(left);
LoseFocusCommand=cmd(stoptweening;linear,0.1;diffusealpha,0); self:y(20);
self:zoomto(320, 2);
self:diffuse(ModeIconColors[gc:GetName()]);
self:diffusealpha(0);
self:fadeleft(0.35);
self:faderight(0.35);
end;
GainFocusCommand=function(self)
self:stoptweening();
self:linear(0.1);
self:diffusealpha(1);
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:linear(0.1);
self:diffusealpha(0);
end;
}; };
LoadFont("_helveticaneuelt std extblk cn 42px") .. { LoadFont("_helveticaneuelt std extblk cn 42px") .. {
Text=gc:GetText(); Text=gc:GetText();
InitCommand=cmd(horizalign,left;diffuse,ModeIconColors[gc:GetName()];shadowcolor,ColorDarkTone(ModeIconColors[gc:GetName()]);shadowlength,2;diffusealpha,0;skewx,-0.125); InitCommand=function(self)
GainFocusCommand=cmd(stoptweening;x,-32;decelerate,0.1;diffusealpha,1;x,0); self:horizalign(left);
LoseFocusCommand=cmd(stoptweening;x,0;accelerate,0.1;diffusealpha,0;x,32;diffusealpha,0); self:diffuse(ModeIconColors[gc:GetName()]);
self:shadowcolor(ColorDarkTone(ModeIconColors[gc:GetName()]));
self:shadowlength(2);
self:diffusealpha(0);
self:skewx(-0.125);
end;
GainFocusCommand=function(self)
self:stoptweening();
self:x(-32);
self:decelerate(0.1);
self:diffusealpha(1);
self:x(0);
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:x(0);
self:accelerate(0.1);
self:diffusealpha(0);
self:x(32);
self:diffusealpha(0);
end;
}; };
LoadFont("_helveticaneuelt std extblk cn 42px") .. { LoadFont("_helveticaneuelt std extblk cn 42px") .. {
Text=THEME:GetString(Var "LoadingScreen", gc:GetName() .. "Explanation"); Text=THEME:GetString(Var "LoadingScreen", gc:GetName() .. "Explanation");
InitCommand=cmd(horizalign,right;x,320;y,30;shadowlength,1;diffusealpha,0;skewx,-0.125;zoom,0.5); InitCommand=function(self)
GainFocusCommand=cmd(stoptweening;x,320+32;decelerate,0.1;diffusealpha,1;x,320); self:horizalign(right);
LoseFocusCommand=cmd(stoptweening;x,320;accelerate,0.1;diffusealpha,0;x,320-32;diffusealpha,0); self:x(320);
self:y(30);
self:shadowlength(1);
self:diffusealpha(0);
self:skewx(-0.125);
self:zoom(0.5);
end;
GainFocusCommand=function(self)
self:stoptweening();
self:x(320+32);
self:decelerate(0.1);
self:diffusealpha(1);
self:x(320);
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:x(320);
self:accelerate(0.1);
self:diffusealpha(0);
self:x(320-32);
self:diffusealpha(0);
end;
}; };
}; };
t.GainFocusCommand=cmd(finishtweening;visible,true;zoom,1.1;decelerate,0.25;zoom,1); t.GainFocusCommand=function(self)
t.LoseFocusCommand=cmd(finishtweening;visible,false;zoom,1); self:finishtweening();
self:visible(true);
self:zoom(1.1);
self:decelerate(0.25);
self:zoom(1);
end;
t.LoseFocusCommand=function(self)
self:finishtweening();
self:visible(false);
self:zoom(1);
end;
return t return t
@@ -3,8 +3,17 @@ local loggedOnSMO = IsNetSMOnline();
local t = Def.ActorFrame{ local t = Def.ActorFrame{
Def.Quad { Def.Quad {
InitCommand=cmd(y,-12;x,160;zoomto,320+32,38;vertalign,top;diffuse,Color.Black;diffusealpha,0.5); InitCommand=function(self)
OnCommand=cmd(faderight,0.45); self:y(-12);
self:x(160);
self:zoomto(320 + 32, 38);
self:vertalign(top);
self:diffuse(Color.Black);
self:diffusealpha(0.5);
end;
OnCommand=function(self)
self:faderight(0.45);
end;
BeginCommand=function(self) BeginCommand=function(self)
if netConnected then if netConnected then
self:zoomtoheight( 38 ); self:zoomtoheight( 38 );
@@ -14,7 +23,12 @@ local t = Def.ActorFrame{
end; end;
}; };
LoadFont("Common Normal") .. { LoadFont("Common Normal") .. {
InitCommand=cmd(uppercase,true;zoom,0.75;shadowlength,1;horizalign,left); InitCommand=function(self)
self:uppercase(true);
self:zoom(0.75);
self:shadowlength(1);
self:horizalign(left);
end;
BeginCommand=function(self) BeginCommand=function(self)
-- check network status -- check network status
if netConnected then if netConnected then
@@ -31,7 +45,13 @@ local t = Def.ActorFrame{
if netConnected then if netConnected then
t[#t+1] = LoadFont("Common Normal") .. { t[#t+1] = LoadFont("Common Normal") .. {
InitCommand=cmd(y,16;horizalign,left;zoom,0.5875;shadowlength,1;diffuse,color("0.72,0.89,1,1")); InitCommand=function(self)
self:y(16);
self:horizalign(left);
self:zoom(0.5875);
self:shadowlength(1);
self:diffuse(color("0.72,0.89,1,1"));
end;
BeginCommand=function(self) BeginCommand=function(self)
self:settext( string.format(Screen.String("Connected to %s"), GetServerName()) ); self:settext( string.format(Screen.String("Connected to %s"), GetServerName()) );
end; end;
@@ -8,12 +8,24 @@ local fSpacingX = 72;
local function MakeDisplayBar( fZoomX, fZoomY ) local function MakeDisplayBar( fZoomX, fZoomY )
return Def.ActorFrame { return Def.ActorFrame {
Def.Quad { Def.Quad {
InitCommand=cmd(vertalign,bottom;y,1;zoomto,fZoomX+2,fZoomY+2); InitCommand=function(self)
OnCommand=cmd(diffuse,Color("Black")); self:vertalign(bottom);
self:y(1);
self:zoomto(fZoomX+2,fZoomY+2);
end;
OnCommand=function(self)
self:diffuse(Color("Black"));
end;
}; };
Def.Quad { Def.Quad {
InitCommand=cmd(vertalign,bottom;zoomto,fZoomX,fZoomY); InitCommand=function(self)
OnCommand=cmd(diffuse,Color("Orange");diffusetopedge,Color("Yellow")); self:vertalign(bottom);
self:zoomto(fZoomX,fZoomY);
end;
OnCommand=function(self)
self:diffuse(Color("Orange"));
self:diffusetopedge(Color("Yellow"));
end;
}; };
}; };
end end
@@ -22,13 +34,19 @@ local function MakeIcon( sTarget )
LoadActor(THEME:GetPathG("MenuTimer","Frame")); LoadActor(THEME:GetPathG("MenuTimer","Frame"));
LoadFont("Common Normal") .. { LoadFont("Common Normal") .. {
Text=sTarget[2]; Text=sTarget[2];
InitCommand=cmd(y,24+2;zoom,0.5;shadowlength,1); InitCommand=function(self)
self:y(24+2);
self:zoom(0.5);
self:shadowlength(1);
end;
}; };
-- --
LoadFont("Common Normal") .. { LoadFont("Common Normal") .. {
Text="0"; Text="0";
OnCommand=cmd(settext, OnCommand=function(self)
( PREFSMAN:GetPreference("EventMode") ) and "" or PREFSMAN:GetPreference("SongsPerPlay") self:settext(( PREFSMAN:GetPreference("EventMode") )
and "" or PREFSMAN:GetPreference("SongsPerPlay"));
end;
); );
Condition=sTarget[1] == "EventMode"; Condition=sTarget[1] == "EventMode";
}; };
@@ -2,8 +2,13 @@ return Def.ActorFrame {
LoadFont("Common Normal") .. { LoadFont("Common Normal") .. {
Text=GetTimingDifficulty(); Text=GetTimingDifficulty();
AltText=""; AltText="";
InitCommand=cmd(horizalign,left;zoom,0.675); InitCommand=function(self)
OnCommand=cmd(shadowlength,1); self:horizalign(left);
self:zoom(0.675);
end;
OnCommand=function(self)
self:shadowlength(1);
end;
BeginCommand=function(self) BeginCommand=function(self)
self:settextf( Screen.String("TimingDifficulty"), "" ); self:settextf( Screen.String("TimingDifficulty"), "" );
end end
@@ -11,12 +16,18 @@ return Def.ActorFrame {
LoadFont("Common Normal") .. { LoadFont("Common Normal") .. {
Text=GetTimingDifficulty(); Text=GetTimingDifficulty();
AltText=""; AltText="";
InitCommand=cmd(x,136;zoom,0.675;halign,0); InitCommand=function(self)
self:x(136);
self:zoom(0.675);
self:halign(0);
end;
OnCommand=function(self) OnCommand=function(self)
(cmd(shadowlength,1;skewx,-0.125))(self); self:shadowlength(1);
self:skewx(-0.125);
if GetTimingDifficulty() == 9 then if GetTimingDifficulty() == 9 then
self:settext("Justice"); self:settext("Justice");
(cmd(zoom,0.5;diffuse,ColorLightTone( Color("Orange")) ))(self); self:zoom(0.5);
self:diffuse(ColorLightTone( Color("Orange")) );
else else
self:settext( GetTimingDifficulty() ); self:settext( GetTimingDifficulty() );
end end
@@ -2,15 +2,45 @@ local gc = Var("GameCommand");
return Def.ActorFrame { return Def.ActorFrame {
Def.Quad{ Def.Quad{
InitCommand=cmd(zoomto,256,26;fadeleft,0.45;faderight,0.45); InitCommand=function(self)
OnCommand=cmd(diffuseshift;effectcolor1,color("0,0,0,0.5");effectcolor2,color("0,0,0,0.5")); self:zoomto(256, 26);
GainFocusCommand=cmd(stoptweening;decelerate,0.1;zoomto,256,26;diffusealpha,1); self:fadeleft(0.45);
LoseFocusCommand=cmd(stoptweening;accelerate,0.1;zoomto,SCREEN_WIDTH,0;diffusealpha,0); self:faderight(0.45);
end;
OnCommand=function(self)
self:diffuseshift();
self:effectcolor1(color("0,0,0,0.5"));
self:effectcolor2(color("0,0,0,0.5"));
end;
GainFocusCommand=function(self)
self:stoptweening();
self:decelerate(0.1);
self:zoomto(256,26);
self:diffusealpha(1);
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:accelerate(0.1);
self:zoomto(SCREEN_WIDTH,0);
self:diffusealpha(0);
end;
}; };
LoadFont("Common Normal") .. { LoadFont("Common Normal") .. {
Text=THEME:GetString("ScreenTitleMenu",gc:GetText()); Text=THEME:GetString("ScreenTitleMenu",gc:GetText());
OnCommand=cmd(shadowlength,1); OnCommand=function(self)
GainFocusCommand=cmd(stoptweening;linear,0.1;zoom,1;diffuse,color("1,1,1,1")); self:shadowlength(1);
LoseFocusCommand=cmd(stoptweening;linear,0.1;zoom,0.75;diffuse,color("0.5,0.5,0.5,1")); end;
GainFocusCommand=function(self)
self:stoptweening();
self:linear(0.1);
self:zoom(1);
self:diffuse(color("1,1,1,1"));
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:linear(0.1);
self:zoom(0.75);
self:diffuse(color("0.5,0.5,0.5,1"));
end;
}; };
}; };
@@ -1,20 +1,28 @@
local t = Def.ActorFrame {}; local t = Def.ActorFrame {};
t[#t+1] = Def.Quad { t[#t+1] = Def.Quad {
InitCommand=cmd(vertalign,top;zoomto,SCREEN_WIDTH+1,50;diffuse,Color.Black); InitCommand=function(self)
self:vertalign(top);
self:zoomto(SCREEN_WIDTH+1,50);
self:diffuse(Color.Black);
end;
} }
--[[ t[#t+1] = LoadActor("Header") .. {
InitCommand=cmd(vertalign,top;zoomtowidth,SCREEN_WIDTH+1;diffuse,color("#ffd400"));
}; ]]
--[[ t[#t+1] = LoadActor("_texture stripe") .. {
InitCommand=cmd(vertalign,top;zoomto,SCREEN_WIDTH+64,44;customtexturerect,0,0,SCREEN_WIDTH+64/8,44/32);
OnCommand=cmd(fadebottom,0.8;texcoordvelocity,1,0;skewx,-0.0025;diffuse,Color("Black");diffusealpha,0.235);
}; --]]
t[#t+1] = LoadFont("Common Bold") .. { t[#t+1] = LoadFont("Common Bold") .. {
Name="HeaderText"; Name="HeaderText";
Text=Screen.String("HeaderText"); Text=Screen.String("HeaderText");
InitCommand=cmd(x,-SCREEN_CENTER_X+24;y,24;zoom,1;horizalign,left;shadowlength,0;maxwidth,200); InitCommand=function(self)
OnCommand=cmd(strokecolor,Color.Invisible;diffusebottomedge,color("0.75,0.75,0.75")); self:x(-SCREEN_CENTER_X+24);
self:y(24);
self:zoom(1);
self:horizalign(left);
self:shadowlength(0);
self:maxwidth(200);
end;
OnCommand=function(self)
self:strokecolor(Color.Invisible);
self:diffusebottomedge(color("0.75,0.75,0.75"));
end;
UpdateScreenHeaderMessageCommand=function(self,param) UpdateScreenHeaderMessageCommand=function(self,param)
self:settext(param.Header); self:settext(param.Header);
end; end;
@@ -2,18 +2,38 @@ local jl = Var "JudgmentLine";
return Def.ActorFrame { return Def.ActorFrame {
Def.Quad { Def.Quad {
InitCommand=cmd(horizalign,right;zoomto,256,18); InitCommand=function(self)
OnCommand=cmd(diffuse,Color("Black");fadeleft,1); self:horizalign(right);
self:zoomto(256,18);
end;
OnCommand=function(self)
self:diffuse(Color("Black"));
self:fadeleft(1);
end;
}; };
Def.Quad { Def.Quad {
InitCommand=cmd(horizalign,left;zoomto,256,18); InitCommand=function(self)
OnCommand=cmd(diffuse,Color("Black");faderight,1); self:horizalign(left);
self:zoomto(256,18);
end;
OnCommand=function(self)
self:diffuse(Color("Black"));
self:faderight(1);
end;
}; };
LoadActor("_frame") .. { LoadActor("_frame") .. {
InitCommand=cmd(diffuse,JudgmentLineToColor(jl)); InitCommand=function(self)
self:diffuse(JudgmentLineToColor(jl));
end;
}; };
LoadFont("Common Normal") .. { LoadFont("Common Normal") .. {
InitCommand=cmd(zoom,0.675;settext,string.upper(JudgmentLineToLocalizedString(jl));diffuse,JudgmentLineToColor(jl);shadowlength,1;maxwidth,180); InitCommand=function(self)
self:zoom(0.675);
self:settext(string.upper(JudgmentLineToLocalizedString(jl)));
self:diffuse(JudgmentLineToColor(jl));
self:shadowlength(1);
self:maxwidth(180);
end;
}; };
}; };