Some more of default. Not yet done.

This commit is contained in:
Jason Felds
2013-07-04 22:50:30 -04:00
parent 8833ab5bc6
commit 162b626e3e
11 changed files with 1275 additions and 938 deletions
@@ -34,7 +34,13 @@ if numPlayers == 1 then
end
t[#t+1] = Def.Quad{
Name="SinglePlayerFilter";
InitCommand=cmd(x,pos;CenterY;zoomto,filterWidth,SCREEN_HEIGHT;diffusecolor,filterColor;diffusealpha,filterAlphas[player]);
InitCommand=function(self)
self:x(pos);
self:CenterY();
self:zoomto(filterWidth, SCREEN_HEIGHT);
self:diffusecolor(filterColor);
self:diffusealpha(filterAlphas[player]);
end;
};
else
-- two players... a bit more complex.
@@ -45,7 +51,13 @@ else
local metricName = "PlayerP".. pNum .."TwoPlayersSharedSidesX"
t[#t+1] = Def.Quad{
Name="RoutineFilter";
InitCommand=cmd(x,THEME:GetMetric("ScreenGameplay",metricName);CenterY;zoomto,filterWidth,SCREEN_HEIGHT;diffusecolor,filterColor;diffusealpha,filterAlphas[player]);
InitCommand=function(self)
self:x(THEME:GetMetric("ScreenGameplay",metricName));
self:CenterY();
self:zoomto(filterWidth, SCREEN_HEIGHT);
self:diffusecolor(filterColor);
self:diffusealpha(filterAlphas[player]);
end;
};
else
-- otherwise we need two separate ones. to the pairsmobile!
@@ -56,7 +68,13 @@ else
local pos = THEME:GetMetric("ScreenGameplay",metricName)
t[#t+1] = Def.Quad{
Name="Player"..pNum.."Filter";
InitCommand=cmd(x,pos;CenterY;zoomto,filterWidth,SCREEN_HEIGHT;diffusecolor,filterColor;diffusealpha,filterAlphas[player]);
InitCommand=function(self)
self:x(pos);
self:CenterY();
self:zoomto(filterWidth, SCREEN_HEIGHT);
self:diffusecolor(filterColor);
self:diffusealpha(filterAlphas[player]);
end;
};
end
end
@@ -3,9 +3,29 @@
local t = Def.ActorFrame{
LoadFont("Common Normal")..{
Name="Header";
InitCommand=cmd(x,SCREEN_LEFT+24;y,SCREEN_TOP+24;halign,0;diffuse,color("#CCCCCC");settext,Screen.String("BodyHeader");shadowlength,1;shadowcolor,HSV(40,0,0.6);diffusetopedge,color("#FFFFFF"));
OnCommand=cmd(queuecommand,"Anim");
AnimCommand=cmd(cropright,1;faderight,1;addx,96;decelerate,1;addx,-96;skewx,-0.1;cropright,0;faderight,0;);
InitCommand=function(self)
self:x(SCREEN_LEFT + 24);
self:y(SCREEN_TOP + 24);
self:halign(0);
self:diffuse(color("#CCCCCC"));
self:settext(Screen.String("BodyHeader"));
self:shadowlength(1);
self:shadowcolor(HSV(40,0,0.6));
self:diffusetopedge(color("#FFFFFF"));
end;
OnCommand=function(self)
self:queuecommand("Anim");
end;
AnimCommand=function(self)
self:cropright(1);
self:faderight(1);
self:addx(96);
self:decelerate(1);
self:addx(-96);
self:skewx(-0.1);
self:cropright(0);
self:faderight(0);
end;
};
-- todo: add explantion paragraph here (above the scroller)
};
@@ -4,10 +4,7 @@ function GetLocalProfiles()
for p = 0,PROFILEMAN:GetNumLocalProfiles()-1 do
local profile=PROFILEMAN:GetLocalProfileFromIndex(p);
local item = Def.ActorFrame {
--[[ Def.Quad {
InitCommand=cmd(zoomto,200,1;y,40/2);
OnCommand=cmd(diffuse,Color('Outline'););
}; --]]
LoadFont("Common Normal") .. {
Text=profile:GetDisplayName();
InitCommand=cmd(shadowlength,1;y,-10;zoom,1;ztest,true);
@@ -41,20 +38,10 @@ function LoadPlayerStuff(Player)
local pn = (Player == PLAYER_1) and 1 or 2;
--[[ local t = LoadActor(THEME:GetPathB('', '_frame 3x3'), 'metal', 200, 230) .. {
Name = 'BigFrame';
}; --]]
local t = Def.ActorFrame {
Name = 'JoinFrame';
LoadCard(Color('Orange'));
--[[ Def.Quad {
InitCommand=cmd(zoomto,200+4,230+4);
OnCommand=cmd(shadowlength,1;diffuse,color("0,0,0,0.5"));
};
Def.Quad {
InitCommand=cmd(zoomto,200,230);
OnCommand=cmd(diffuse,Color('Orange');diffusealpha,0.5);
}; --]]
LoadFont("Common Normal") .. {
Text=THEME:GetString("ScreenSelectProfile","PressStart");
InitCommand=cmd(shadowlength,1);
@@ -69,15 +56,9 @@ function LoadPlayerStuff(Player)
};
table.insert( ret, t );
--[[ t = LoadActor(THEME:GetPathB('', '_frame 3x3'), 'metal', 170, 20) .. {
Name = 'SmallFrame';
}; --]]
t = Def.ActorFrame {
Name = 'SmallFrame';
--[[ Def.Quad {
InitCommand=cmd(zoomto,170+4,32+4);
OnCommand=cmd(shadowlength,1);
}; --]]
InitCommand=cmd(y,-2);
Def.Quad {
InitCommand=cmd(zoomto,200-10,40+2);
@@ -101,15 +82,11 @@ function LoadPlayerStuff(Player)
t = Def.ActorScroller{
Name = 'ProfileScroller';
NumItemsToDraw=6;
-- InitCommand=cmd(y,-230/2+20;);
OnCommand=cmd(y,1;SetFastCatchup,true;SetMask,200,58;SetSecondsPerItem,0.15);
TransformFunction=function(self, offset, itemIndex, numItems)
local focus = scale(math.abs(offset),0,2,1,0);
self:visible(false);
self:y(math.floor( offset*40 ));
-- self:zoomy( focus );
-- self:z(-math.abs(offset));
-- self:zoom(focus);
end;
children = GetLocalProfiles();
};
@@ -117,25 +94,10 @@ function LoadPlayerStuff(Player)
t = Def.ActorFrame {
Name = "EffectFrame";
--[[ Def.Quad {
InitCommand=cmd(y,-230/2;vertalign,top;zoomto,200,8;fadebottom,1);
OnCommand=cmd(diffuse,Color("Black");diffusealpha,0.25);
};
Def.Quad {
InitCommand=cmd(y,230/2;vertalign,bottom;zoomto,200,8;fadetop,1);
OnCommand=cmd(diffuse,Color("Black");diffusealpha,0.25);
}; --]]
};
table.insert( ret, t );
--[[ t = Def.BitmapText {
OnCommand = cmd(y,160);
Name = 'SelectedProfileText';
Font = "Common Normal";
Text = 'No profile';
}; --]]
t = LoadFont("Common Normal") .. {
Name = 'SelectedProfileText';
--InitCommand=cmd(y,160;shadowlength,1;diffuse,PlayerColor(Player));
InitCommand=cmd(y,160;shadowlength,1;);
};
table.insert( ret, t );
@@ -260,37 +222,67 @@ local t = Def.ActorFrame {
children = {
Def.ActorFrame {
Name = 'P1Frame';
InitCommand=cmd(x,SCREEN_CENTER_X-160;y,SCREEN_CENTER_Y);
OnCommand=cmd(zoom,0;bounceend,0.35;zoom,1);
OffCommand=cmd(bouncebegin,0.35;zoom,0);
InitCommand=function(self)
self:x(SCREEN_CENTER_X - 160);
self:y(SCREEN_CENTER_Y);
end;
OnCommand=function(self)
self:zoom(0);
self:bounceend(0.35);
self:zoom(1);
end;
OffCommand=function(self)
self:bouncebegin(0.35);
self:zoom(0);
end;
PlayerJoinedMessageCommand=function(self,param)
if param.Player == PLAYER_1 then
(cmd(;zoom,1.15;bounceend,0.175;zoom,1.0;))(self);
self:zoom(1.15);
self:bounceend(0.175);
self:zoom(1.0);
end;
end;
children = LoadPlayerStuff(PLAYER_1);
};
Def.ActorFrame {
Name = 'P2Frame';
InitCommand=cmd(x,SCREEN_CENTER_X+160;y,SCREEN_CENTER_Y);
OnCommand=cmd(zoom,0;bounceend,0.35;zoom,1);
OffCommand=cmd(bouncebegin,0.35;zoom,0);
InitCommand=function(self)
self:x(SCREEN_CENTER_X + 160);
self:y(SCREEN_CENTER_Y);
end;
OnCommand=function(self)
self:zoom(0);
self:bounceend(0.35);
self:zoom(1);
end;
OffCommand=function(self)
self:bouncebegin(0.35);
self:zoom(0);
end;
PlayerJoinedMessageCommand=function(self,param)
if param.Player == PLAYER_2 then
(cmd(zoom,1.15;bounceend,0.175;zoom,1.0;))(self);
self:zoom(1.15);
self:bounceend(0.175);
self:zoom(1.0);
end;
end;
children = LoadPlayerStuff(PLAYER_2);
};
-- sounds
LoadActor( THEME:GetPathS("Common","start") )..{
StartButtonMessageCommand=cmd(play);
StartButtonMessageCommand=function(self)
self:play();
end;
};
LoadActor( THEME:GetPathS("Common","cancel") )..{
BackButtonMessageCommand=cmd(play);
BackButtonMessageCommand=function(self)
self:play();
end;
};
LoadActor( THEME:GetPathS("Common","value") )..{
DirectionButtonMessageCommand=cmd(play);
DirectionButtonMessageCommand=function(self)
self:play();
end;
};
};
};
@@ -38,7 +38,10 @@ for i=1,Params.NumParticles do
self:y(math.random(SCREEN_TOP+(self:GetHeight()/2),SCREEN_BOTTOM-(self:GetHeight()/2)));
--self:z(math.random(-64,0));
end;
OnCommand=cmd(diffuse,ColorLightTone(color("#ffd400"));diffusealpha,0.8);
OnCommand=function(self)
self:diffuse(ColorLightTone(color("#ffd400")));
self:diffusealpha(0.8);
end;
};
end
@@ -69,6 +72,9 @@ local function UpdateParticles(self,DeltaTime)
end;
end;
t.InitCommand = cmd(fov,90;SetUpdateFunction,UpdateParticles);
t.InitCommand = function(self)
self:fov(90);
self:SetUpdateFunction(UpdateParticles);
end;
return t;
@@ -8,7 +8,11 @@ local LifeRatio;
local t = Def.ActorFrame {
LoadActor("_lives")..{
InitCommand=cmd(pause;horizalign,left;x,-(barWidth/2));
InitCommand=function(self)
self:pause();
self:horizalign(left);
self:x(barWidth / -2);
end;
BeginCommand=function(self,param)
local screen = SCREENMAN:GetTopScreen();
local glifemeter = screen:GetLifeMeter(player);
@@ -36,7 +40,9 @@ local t = Def.ActorFrame {
self:setstate( math.max(param.LivesLeft-1,0) );
end
end;
FinishCommand=cmd(playcommand,"Start");
FinishCommand=function(self)
self:playcommand("Start");
end;
};
};
+86 -26
View File
@@ -29,12 +29,24 @@ local function CreatePaneDisplayItem( _pnPlayer, _sLabel, _rcRadarCategory )
Text=string.format("%04i", 0);
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()
@@ -62,12 +74,24 @@ local function CreatePaneDisplayGraph( _pnPlayer, _sLabel, _rcRadarCategory )
Def.Quad {
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()
@@ -85,12 +109,24 @@ local function CreatePaneDisplayGraph( _pnPlayer, _sLabel, _rcRadarCategory )
LoadFont("Common Normal") .. {
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()
@@ -108,29 +144,53 @@ end;
t[#t+1] = Def.ActorFrame {
-- Left
CreatePaneDisplayItem( iPN, "Taps", 'RadarCategory_TapsAndHolds' ) .. {
InitCommand=cmd(x,-128+16+8;y,-14);
InitCommand=function(self)
self:x(-128 + 16 + 8);
self:y(-14 + 16 * 0);
end;
};
CreatePaneDisplayItem( iPN, "Jumps", 'RadarCategory_Jumps' ) .. {
InitCommand=cmd(x,-128+16+8;y,-14+16);
InitCommand=function(self)
self:x(-128 + 16 + 8);
self:y(-14 + 16 * 1);
end;
};
CreatePaneDisplayItem( iPN, "Holds", 'RadarCategory_Holds' ) .. {
InitCommand=cmd(x,-128+16+8;y,-14+16*2);
InitCommand=function(self)
self:x(-128 + 16 + 8);
self:y(-14 + 16 * 2);
end;
};
CreatePaneDisplayItem( iPN, "Mines", 'RadarCategory_Mines' ) .. {
InitCommand=cmd(x,-128+16+8;y,-14+16*3);
InitCommand=function(self)
self:x(-128 + 16 + 8);
self:y(-14 + 16 * 3);
end;
};
-- Center
CreatePaneDisplayItem( iPN, "Hands", 'RadarCategory_Hands' ) .. {
InitCommand=cmd(x,8;y,-14);
InitCommand=function(self)
self:x(8);
self:y(-14 + 16 * 0);
end;
};
CreatePaneDisplayItem( iPN, "Rolls", 'RadarCategory_Rolls' ) .. {
InitCommand=cmd(x,8;y,-14+16);
InitCommand=function(self)
self:x(8);
self:y(-14 + 16 * 1);
end;
};
CreatePaneDisplayItem( iPN, "Lifts", 'RadarCategory_Lifts' ) .. {
InitCommand=cmd(x,8;y,-14+16*2);
InitCommand=function(self)
self:x(8);
self:y(-14 + 16 * 2);
end;
};
CreatePaneDisplayItem( iPN, "Fakes", 'RadarCategory_Fakes' ) .. {
InitCommand=cmd(x,8;y,-14+16*3);
InitCommand=function(self)
self:x(8);
self:y(-14 + 16 * 3);
end;
};
};
return t;
@@ -58,28 +58,44 @@ t[#t+1] = Def.ActorFrame {
Name="Judgment";
InitCommand=cmd(pause;visible,false);
OnCommand=THEME:GetMetric("Judgment","JudgmentOnCommand");
ResetCommand=cmd(finishtweening;stopeffect;visible,false);
ResetCommand=function(self)
self:finishtweening();
self:stopeffect();
self:visible(false);
end;
};
LoadFont("Combo Numbers") .. {
Name="ProtimingDisplay";
Text="";
InitCommand=cmd(visible,false);
OnCommand=THEME:GetMetric("Protiming","ProtimingOnCommand");
ResetCommand=cmd(finishtweening;stopeffect;visible,false);
ResetCommand=function(self)
self:finishtweening();
self:stopeffect();
self:visible(false);
end;
};
LoadFont("Common Normal") .. {
Name="ProtimingAverage";
Text="";
InitCommand=cmd(visible,false);
OnCommand=THEME:GetMetric("Protiming","AverageOnCommand");
ResetCommand=cmd(finishtweening;stopeffect;visible,false);
ResetCommand=function(self)
self:finishtweening();
self:stopeffect();
self:visible(false);
end;
};
LoadFont("Common Normal") .. {
Name="TextDisplay";
Text=THEME:GetString("Protiming","MS");
InitCommand=cmd(visible,false);
OnCommand=THEME:GetMetric("Protiming","TextOnCommand");
ResetCommand=cmd(finishtweening;stopeffect;visible,false);
ResetCommand=function(self)
self:finishtweening();
self:stopeffect();
self:visible(false);
end;
};
Def.Quad {
Name="ProtimingGraphBG";
@@ -90,43 +106,71 @@ t[#t+1] = Def.ActorFrame {
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);
ResetCommand=function(self)
self:finishtweening();
self:diffusealpha(1);
self:visible(false);
end;
OnCommand=cmd(diffuse,Color("White");diffusealpha,1);
};
InitCommand = function(self)
@@ -199,7 +243,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,
@@ -217,14 +260,30 @@ t[#t+1] = Def.ActorFrame {
);
-- c.ProtimingGraphAverage:zoomtowidth( clamp(MakeAverage( tTotalJudgments ) * 1880,0,188) );
c.ProtimingGraphCenter:visible( bShowProtiming );
(cmd(sleep,2;linear,0.5;diffusealpha,0))(c.ProtimingGraphBG);
(cmd(sleep,2;linear,0.5;diffusealpha,0))(c.ProtimingGraphUnderlay);
(cmd(sleep,2;linear,0.5;diffusealpha,0))(c.ProtimingGraphWindowW3);
(cmd(sleep,2;linear,0.5;diffusealpha,0))(c.ProtimingGraphWindowW2);
(cmd(sleep,2;linear,0.5;diffusealpha,0))(c.ProtimingGraphWindowW1);
(cmd(sleep,2;linear,0.5;diffusealpha,0))(c.ProtimingGraphFill);
(cmd(sleep,2;linear,0.5;diffusealpha,0))(c.ProtimingGraphAverage);
(cmd(sleep,2;linear,0.5;diffusealpha,0))(c.ProtimingGraphCenter);
c.ProtimingGraphBG.sleep(2);
c.ProtimingGraphBG.linear(0.5);
c.ProtimingGraphBG.diffusealpha(0);
c.ProtimingGraphUnderlay.sleep(2);
c.ProtimingGraphUnderlay.linear(0.5);
c.ProtimingGraphUnderlay.diffusealpha(0);
c.ProtimingGraphWindowW3.sleep(2);
c.ProtimingGraphWindowW3.linear(0.5);
c.ProtimingGraphWindowW3.diffusealpha(0);
c.ProtimingGraphWindowW2.sleep(2);
c.ProtimingGraphWindowW2.linear(0.5);
c.ProtimingGraphWindowW2.diffusealpha(0);
c.ProtimingGraphWindowW1.sleep(2);
c.ProtimingGraphWindowW1.linear(0.5);
c.ProtimingGraphWindowW1.diffusealpha(0);
c.ProtimingGraphFill.sleep(2);
c.ProtimingGraphFill.linear(0.5);
c.ProtimingGraphFill.diffusealpha(0);
c.ProtimingGraphAverage.sleep(2);
c.ProtimingGraphAverage.linear(0.5);
c.ProtimingGraphAverage.diffusealpha(0);
c.ProtimingGraphCenter.sleep(2);
c.ProtimingGraphCenter.linear(0.5);
c.ProtimingGraphCenter.diffusealpha(0);
end;
};
@@ -7,8 +7,14 @@ local previewHeight = SCREEN_CENTER_Y;
local t = Def.ActorFrame{
Name="PreviewFrame";
InitCommand=cmd(x,SCREEN_CENTER_X*1.5;y,SCREEN_CENTER_Y*0.85);
OffCommand=cmd(bouncebegin,0.25;addx,SCREEN_CENTER_X);
InitCommand=function(self)
self:x(SCREEN_CENTER_X * 1.5);
self:y(SCREEN_CENTER_Y * 0.85);
end;
OffCommand=function(self)
self:bouncebegin(0.25);
self:addx(SCREEN_CENTER_X);
end;
};
local function TitleMenuItem(text,focused)
@@ -16,92 +22,231 @@ local function TitleMenuItem(text,focused)
local textColor = focused and color("#FFFFFF") or color("#888888");
return LoadFont("Common Normal")..{
Text=text;
InitCommand=cmd(zoom,0.45;strokecolor,Color("Outline");diffuse,textColor);
GainFocusCommand=cmd(stoptweening;decelerate,0.5;diffusealpha,1);
LoseFocusCommand=cmd(stoptweening;accelerate,0.5;diffusealpha,0);
InitCommand=function(self)
self:zoom(0.45);
self:strokecolor(Color("Outline"));
self:diffuse(textColor);
end;
GainFocusCommand=function(self)
self:stoptweening();
self:decelerate(0.5);
self:diffusealpha(1);
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:accelerate(0.5);
self:diffusealpha(0);
end;
};
end;
local previews = {
WhereToFind = Def.ActorFrame{
LoadActor(THEME:GetPathG("_howto","find"))..{
InitCommand=cmd(zoomto,previewWidth,previewHeight);
GainFocusCommand=cmd(stoptweening;decelerate,0.5;diffusealpha,1);
LoseFocusCommand=cmd(stoptweening;accelerate,0.5;diffusealpha,0);
InitCommand=function(self)
self:zoomto(previewWidth, previewHeight);
end;
GainFocusCommand=function(self)
self:stoptweening();
self:decelerate(0.5);
self:diffusealpha(1);
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:accelerate(0.5);
self:diffusealpha(0);
end;
};
};
HowToInstall = Def.ActorFrame{
LoadActor(THEME:GetPathG("_howto","install"))..{
InitCommand=cmd(zoomto,previewWidth,previewHeight);
GainFocusCommand=cmd(stoptweening;decelerate,0.5;diffusealpha,1);
LoseFocusCommand=cmd(stoptweening;accelerate,0.5;diffusealpha,0);
InitCommand=function(self)
self:zoomto(previewWidth, previewHeight);
end;
GainFocusCommand=function(self)
self:stoptweening();
self:decelerate(0.5);
self:diffusealpha(1);
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:accelerate(0.5);
self:diffusealpha(0);
end;
};
};
AdditionalFolders = Def.ActorFrame{
Def.Quad{
InitCommand=cmd(zoomto,previewWidth,previewHeight);
GainFocusCommand=cmd(stoptweening;decelerate,0.5;diffusealpha,1);
LoseFocusCommand=cmd(stoptweening;accelerate,0.5;diffusealpha,0);
InitCommand=function(self)
self:zoomto(previewWidth, previewHeight);
end;
GainFocusCommand=function(self)
self:stoptweening();
self:decelerate(0.5);
self:diffusealpha(1);
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:accelerate(0.5);
self:diffusealpha(0);
end;
};
Def.Quad{
InitCommand=cmd(y,-previewHeight*0.45;diffuse,color("#E0F0F0");zoomto,previewWidth,previewHeight*0.1;);
GainFocusCommand=cmd(stoptweening;decelerate,0.5;diffusealpha,1);
LoseFocusCommand=cmd(stoptweening;accelerate,0.5;diffusealpha,0);
InitCommand=function(self)
self:y(-previewHeight * 0.45);
self:diffuse(color("#E0F0F0"));
self:zoomto(previewWidth, previewHeight * 0.1);
end;
GainFocusCommand=function(self)
self:stoptweening();
self:decelerate(0.5);
self:diffusealpha(1);
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:accelerate(0.5);
self:diffusealpha(0);
end;
};
LoadFont("Common normal")..{
InitCommand=cmd(x,-(SCREEN_CENTER_X*0.4);y,-(SCREEN_CENTER_Y*0.475);zoom,0.625;halign,0;valign,0;diffuse,color("#000000"));
InitCommand=function(self)
self:x(SCREEN_CENTER_X * -0.4);
self:y(SCREEN_CENTER_Y * -0.475);
self:zoom(0.625);
self:halign(0);
self:valign(0);
self:diffuse(color("#000000"));
end;
BeginCommand=function(self)
local text = "Preferences.ini";
self:settext(text);
end;
GainFocusCommand=cmd(stoptweening;decelerate,0.5;diffusealpha,1);
LoseFocusCommand=cmd(stoptweening;accelerate,0.5;diffusealpha,0);
GainFocusCommand=function(self)
self:stoptweening();
self:decelerate(0.5);
self:diffusealpha(1);
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:accelerate(0.5);
self:diffusealpha(0);
end;
};
LoadFont("Common normal")..{
Text="[Options]\nAdditionalCourseFolders=\nAdditionalFolders=\nAdditionalSongFolders=";
InitCommand=cmd(x,-(SCREEN_CENTER_X*0.4);y,-(SCREEN_CENTER_Y*0.35);zoom,0.75;halign,0;valign,0;diffuse,color("#000000"));
GainFocusCommand=cmd(stoptweening;decelerate,0.5;diffusealpha,1);
LoseFocusCommand=cmd(stoptweening;accelerate,0.5;diffusealpha,0);
InitCommand=function(self)
self:x(SCREEN_CENTER_X * -0.4);
self:y(SCREEN_CENTER_Y * -0.35);
self:zoom(0.75);
self:halign(0);
self:valign(0);
self:diffuse(color("#000000"));
end;
GainFocusCommand=function(self)
self:stoptweening();
self:decelerate(0.5);
self:diffusealpha(1);
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:accelerate(0.5);
self:diffusealpha(0);
end;
};
};
ReloadSongs = Def.ActorFrame{
LoadActor(THEME:GetPathB("ScreenTitleMenu","background/_bg"))..{
InitCommand=cmd(zoomto,previewWidth,previewHeight;halign,0.5;valign,0.5);
GainFocusCommand=cmd(stoptweening;decelerate,0.5;diffusealpha,1);
LoseFocusCommand=cmd(stoptweening;accelerate,0.5;diffusealpha,0);
InitCommand=function(self)
self:zoomto(previewWidth, previewHeight);
self:halign(0.5);
self:valign(0.5);
end;
GainFocusCommand=function(self)
self:stoptweening();
self:decelerate(0.5);
self:diffusealpha(1);
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:accelerate(0.5);
self:diffusealpha(0);
end;
};
LoadFont("Common normal")..{
InitCommand=cmd(zoom,0.4;maxwidth,(previewWidth*1.6)-8);
InitCommand=function(self)
self:zoom(0.4);
self:maxwidth((previewWidth * 1.6) - 8);
end;
BeginCommand=function(self)
local song = SONGMAN:GetRandomSong();
self:settext("Loading songs...\n"..song:GetGroupName().."\n"..song:GetDisplayFullTitle());
end;
GainFocusCommand=cmd(stoptweening;decelerate,0.5;diffusealpha,1);
LoseFocusCommand=cmd(stoptweening;accelerate,0.5;diffusealpha,0);
GainFocusCommand=function(self)
self:stoptweening();
self:decelerate(0.5);
self:diffusealpha(1);
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:accelerate(0.5);
self:diffusealpha(0);
end;
};
};
Exit = Def.ActorFrame{
LoadActor(THEME:GetPathB("ScreenTitleMenu","background/_bg"))..{
InitCommand=cmd(zoomto,previewWidth,previewHeight;halign,0.5;valign,0.5);
GainFocusCommand=cmd(stoptweening;decelerate,0.5;diffusealpha,1);
LoseFocusCommand=cmd(stoptweening;accelerate,0.5;diffusealpha,0);
InitCommand=function(self)
self:zoomto(previewWidth, previewHeight);
self:halign(0.5);
self:valign(0.5);
end;
GainFocusCommand=function(self)
self:stoptweening();
self:decelerate(0.5);
self:diffusealpha(1);
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:accelerate(0.5);
self:diffusealpha(0);
end;
};
LoadActor(THEME:GetPathG("ScreenTitleMenu","logo"))..{
InitCommand=cmd(y,-28;zoom,0.35;propagate,true);
GainFocusCommand=cmd(stoptweening;decelerate,0.5;diffusealpha,1);
LoseFocusCommand=cmd(stoptweening;accelerate,0.5;diffusealpha,0);
InitCommand=function(self)
self:y(-28);
self:zoom(0.35);
self:propagate(true);
end;
GainFocusCommand=function(self)
self:stoptweening();
self:decelerate(0.5);
self:diffusealpha(1);
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:accelerate(0.5);
self:diffusealpha(0);
end;
};
TitleMenuItem("Game Start",true)..{
InitCommand=cmd(y,20);
InitCommand=function(self)
self:y(20);
end;
};
TitleMenuItem("Options")..{
InitCommand=cmd(y,32);
InitCommand=function(self)
self:y(32);
end;
};
TitleMenuItem("Edit/Share")..{
InitCommand=cmd(y,44);
InitCommand=function(self)
self:y(44);
end;
};
TitleMenuItem("Exit")..{
InitCommand=cmd(y,56);
InitCommand=function(self)
self:y(56);
end;
};
};
};
@@ -113,9 +258,26 @@ t[#t+1] = LoadFont("Common normal")..{
--Text="The quick brown fox jumps over the lazy dog ".. Index .." times.";
Text=Screen.String("Explanation-"..Name);
-- was x,-(SCREEN_CENTER_X*0.4);y,SCREEN_CENTER_Y*0.525;
InitCommand=cmd(x,-(SCREEN_CENTER_X*0.8);y,SCREEN_CENTER_Y*0.8;halign,0;valign,0;zoom,0.65;wrapwidthpixels,(SCREEN_WIDTH*0.55)*1.75;NoStroke;shadowlength,1);
GainFocusCommand=cmd(stoptweening;decelerate,0.5;diffusealpha,1);
LoseFocusCommand=cmd(stoptweening;accelerate,0.5;diffusealpha,0);
InitCommand=function(self)
self:x(SCREEN_CENTER_X * -0.8);
self:y(SCREEN_CENTER_Y * 0.8);
self:halign(0);
self:valign(0);
self:zoom(0.65);
self:wrapwidthpixels((SCREEN_WIDTH * 0.55) * 1.75);
self:NoStroke();
self:shadowlength(1);
end;
GainFocusCommand=function(self)
self:stoptweening();
self:decelerate(0.5);
self:diffusealpha(1);
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:accelerate(0.5);
self:diffusealpha(0);
end;
};
return t;
@@ -8,26 +8,3 @@ return Def.HelpDisplay {
self:SetTipsColonSeparated( params.Text );
end;
};
--[[ local sString = THEME:GetString(Var "LoadingScreen","AlternateHelpText");
local tItems = split(sString,"&");
local t = Def.ActorScroller {
NumItemsToDraw=#tItems;
SecondsPerItem=1.25;
TransformFunction=function( self, offset, itemIndex, numItems )
self:x( offset*74 );
end;
InitCommand=cmd(SetLoop,true);
-- OnCommand=cmd(scrollwithpadding,10,0);
};
for i=1,#tItems do
t[#t+1] = Def.ActorFrame {
LoadFont("HelpDisplay", "text") .. {
Text=tostring(tItems[i]);
OnCommand=THEME:GetMetric( Var "LoadingScreen","HelpOnCommand");
};
};
end
return t; --]]
@@ -11,8 +11,6 @@ local colors = {
local t = Def.ActorFrame {};
-- Background!
t[#t+1] = Def.ActorFrame {
-- GainFocusCommand=cmd(visible,true);
-- LoseFocusCommand=cmd(visible,false);
LoadActor(THEME:GetPathG("ScreenSelectPlayMode","BackgroundFrame")) .. {
InitCommand=cmd(diffuse,Color("Black");diffusealpha,0.7);
GainFocusCommand=cmd(visible,true);
@@ -35,21 +35,38 @@ local function MakeIcon( sTarget )
Def.ActorFrame {
-- Life goes up to 1-5
Def.ActorFrame {
InitCommand=cmd(y,12);
InitCommand=function(self)
self:y(12);
end;
MakeDisplayBar( 6, 5 ) .. {
InitCommand=cmd(x,-16;visible,( GetLifeDifficulty() >= 1 ));
InitCommand=function(self)
self:x(-16);
self:visible( GetLifeDifficulty() >= 1 );
end;
};
MakeDisplayBar( 6, 9 ) .. {
InitCommand=cmd(x,-8;visible,( GetLifeDifficulty() >= 2 ));
InitCommand=function(self)
self:x(-8);
self:visible( GetLifeDifficulty() >= 2 );
end;
};
MakeDisplayBar( 6, 13 ) .. {
InitCommand=cmd(x,0;visible,( GetLifeDifficulty() >= 3 ));
InitCommand=function(self)
self:x(0);
self:visible( GetLifeDifficulty() >= 3 );
end;
};
MakeDisplayBar( 6, 16 ) .. {
InitCommand=cmd(x,8;visible,( GetLifeDifficulty() >= 4 ));
InitCommand=function(self)
self:x(8);
self:visible( GetLifeDifficulty() >= 4 );
end;
};
MakeDisplayBar( 6, 20 ) .. {
InitCommand=cmd(x,16;visible,( GetLifeDifficulty() >= 5 ));
InitCommand=function(self)
self:x(16);
self:visible( GetLifeDifficulty() >= 5 );
end;
};
};
Condition=sTarget[1] == "LifeDifficulty";
@@ -57,47 +74,69 @@ local function MakeIcon( sTarget )
Def.ActorFrame {
-- Timing goes up to 1-8
Def.ActorFrame {
InitCommand=cmd(y,12);
InitCommand=function(self)
self:y(12);
end;
MakeDisplayBar( 4, 5 ) .. {
InitCommand=cmd(x,-20;visible,( GetTimingDifficulty() >= 1 ));
InitCommand=function(self)
self:x(-20);
self:visible( GetTimingDifficulty() >= 1 );
end;
};
MakeDisplayBar( 4, 9 ) .. {
InitCommand=cmd(x,-15;visible,( GetTimingDifficulty() >= 2 ));
InitCommand=function(self)
self:x(-215);
self:visible( GetTimingDifficulty() >= 2 );
end;
};
MakeDisplayBar( 4, 13 ) .. {
InitCommand=cmd(x,-10;visible,( GetTimingDifficulty() >= 3 ));
InitCommand=function(self)
self:x(-10);
self:visible( GetTimingDifficulty() >= 3 );
end;
};
MakeDisplayBar( 4, 16 ) .. {
InitCommand=cmd(x,-5;visible,( GetTimingDifficulty() >= 4 ));
InitCommand=function(self)
self:x(-5);
self:visible( GetTimingDifficulty() >= 4 );
end;
};
MakeDisplayBar( 4, 20 ) .. {
InitCommand=cmd(x,5;visible,( GetTimingDifficulty() >= 5 ));
InitCommand=function(self)
self:x(5);
self:visible( GetTimingDifficulty() >= 5 );
end;
};
MakeDisplayBar( 4, 20 ) .. {
InitCommand=cmd(x,10;visible,( GetTimingDifficulty() >= 6 ));
function(self)
self:x(10);
self:visible( GetTimingDifficulty() >= 6 );
end;
};
MakeDisplayBar( 4, 20 ) .. {
InitCommand=cmd(x,15;visible,( GetTimingDifficulty() >= 7 ));
function(self)
self:x(15);
self:visible( GetTimingDifficulty() >= 7 );
end;
};
MakeDisplayBar( 4, 20 ) .. {
InitCommand=cmd(x,20;visible,( GetTimingDifficulty() >= 8 ));
function(self)
self:x(20);
self:visible( GetTimingDifficulty() >= 8 );
end;
};
};
Condition=sTarget[1] == "TimingDifficulty";
};
--
--[[ for i=1,8 do
t[#t+1] = Def.Quad {
InitCommand=cmd(vertalign,bottom;zoomto,4,10+(i*4));
};
end --]]
};
return t
end;
for i=1,#tInfo do
t[#t+1] = MakeIcon( tInfo[i] ) .. {
InitCommand=cmd(x,(i-1)*fSpacingX);
InitCommand=function(self)
self:x((i - 1) * fSpacingX);
end;
};
end