Revert "DONE! All lua is future-proofed."

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