This commit is contained in:
Glenn Maynard
2007-05-04 18:41:55 +00:00
parent 464356151d
commit 1af23e291e
6 changed files with 60 additions and 69 deletions
@@ -1,4 +1,4 @@
local children = {
local t = Def.ActorFrame {
Def.ActorFrame {
OnCommand=function(self)
local width=136
@@ -21,30 +21,28 @@ local children = {
self:GetChild("right"):zoomtoheight(height+thickness)
end;
children = {
Def.Quad {
Name="middle";
InitCommand=cmd(diffuse,0,0,0,1;shadowlength,6);
OnCommand=cmd();
};
Def.Quad {
Name="top";
InitCommand=cmd(zoomtoheight,3);
};
Def.Quad {
Name="bottom";
InitCommand=cmd(zoomtoheight,3;diffuse,0.2,0.2,1,1);
};
Def.Quad {
Name="left";
InitCommand=cmd(zoomtowidth,3;diffusebottomedge,0.2,0.2,1,1);
};
Def.Quad {
Name="right";
InitCommand=cmd(zoomtowidth,3;diffusebottomedge,0.2,0.2,1,1);
};
Def.Quad {
Name="middle";
InitCommand=cmd(diffuse,0,0,0,1;shadowlength,6);
OnCommand=cmd();
};
Def.Quad {
Name="top";
InitCommand=cmd(zoomtoheight,3);
};
Def.Quad {
Name="bottom";
InitCommand=cmd(zoomtoheight,3;diffuse,0.2,0.2,1,1);
};
Def.Quad {
Name="left";
InitCommand=cmd(zoomtowidth,3;diffusebottomedge,0.2,0.2,1,1);
};
Def.Quad {
Name="right";
InitCommand=cmd(zoomtowidth,3;diffusebottomedge,0.2,0.2,1,1);
};
};
}
return Def.ActorFrame { children = children };
return t;
@@ -1,9 +1,7 @@
local t = Def.ActorFrame {
children = {
LoadActor( THEME:GetPathS("", "_swoosh normal") ) .. {
StartTransitioningCommand=cmd(play);
};
LoadActor( THEME:GetPathB("", "_fade out normal") );
LoadActor( THEME:GetPathS("", "_swoosh normal") ) .. {
StartTransitioningCommand=cmd(play);
};
LoadActor( THEME:GetPathB("", "_fade out normal") );
};
return t;
@@ -1,9 +1,7 @@
local t = Def.ActorFrame {
children = {
LoadActor( THEME:GetPathS("", "_swoosh normal") ) .. {
StartTransitioningCommand=cmd(play);
};
Def.Actor { OnCommand=cmd(sleep,0.5); };
LoadActor( THEME:GetPathS("", "_swoosh normal") ) .. {
StartTransitioningCommand=cmd(play);
};
Def.Actor { OnCommand=cmd(sleep,0.5); };
};
return t;
@@ -1,8 +1,8 @@
local children = {
LoadActor( THEME:GetPathB("","_shared background normal") );
LoadActor( THEME:GetPathB("","_fade in normal") ) .. {
OnCommand=cmd(playcommand,"StartTransitioning");
};
local t = Def.ActorFrame { };
t[#t+1] = LoadActor( THEME:GetPathB("","_shared background normal") );
t[#t+1] = LoadActor( THEME:GetPathB("","_fade in normal") ) .. {
OnCommand=cmd(playcommand,"StartTransitioning");
};
return Def.ActorFrame { children=children };
return t;
@@ -2,32 +2,30 @@ local frame = Def.ActorFrame
{
OnCommand=cmd(x,SCREEN_CENTER_X+180;y,SCREEN_CENTER_Y);--;addx,SCREEN_WIDTH/2;decelerate,0.5;addx,-SCREEN_WIDTH/2);
OffCommand=cmd(accelerate,0.5;addx,SCREEN_WIDTH/2);
children = {
LoadFont("Common", "normal") .. {
OnCommand=cmd(horizalign,left;x,-80;y,-130;zoom,0.65;playcommand,"CurrentCourseChanged");
CurrentCourseChangedMessageCommand=function(self)
local c = GAMESTATE:GetCurrentCourse()
if c then
self:settext( c:GetDisplayFullTitle() )
else
self:settext( "" )
end
end;
};
LoadFont("Common", "normal") .. {
OnCommand=cmd(horizalign,left;x,-80;y,-100;zoom,0.65;playcommand,"CurrentTrailP1Changed");
CurrentTrailP1ChangedMessageCommand=function(self)
local t = GAMESTATE:GetCurrentTrail( PLAYER_1 )
if t then
local st = GAMEMAN:StepsTypeToLocalizedString( t:GetStepsType() )
local cd = CourseDifficultyToLocalizedString( t:GetDifficulty() )
self:settext( st .. ", " .. cd )
else
self:settext( "" )
end
end;
};
LoadFont("Common", "normal") .. {
OnCommand=cmd(horizalign,left;x,-80;y,-130;zoom,0.65;playcommand,"CurrentCourseChanged");
CurrentCourseChangedMessageCommand=function(self)
local c = GAMESTATE:GetCurrentCourse()
if c then
self:settext( c:GetDisplayFullTitle() )
else
self:settext( "" )
end
end;
};
LoadFont("Common", "normal") .. {
OnCommand=cmd(horizalign,left;x,-80;y,-100;zoom,0.65;playcommand,"CurrentTrailP1Changed");
CurrentTrailP1ChangedMessageCommand=function(self)
local t = GAMESTATE:GetCurrentTrail( PLAYER_1 )
if t then
local st = GAMEMAN:StepsTypeToLocalizedString( t:GetStepsType() )
local cd = CourseDifficultyToLocalizedString( t:GetDifficulty() )
self:settext( st .. ", " .. cd )
else
self:settext( "" )
end
end;
};
};
return Def.ActorFrame { children = { frame } };
return Def.ActorFrame { frame };
@@ -28,13 +28,12 @@ local p, a = ...
assert( (#p%2) == 1 );
local t = Def.ActorFrame {
children = { }
};
local Widths = { }
local TextureXPos = 0
for i = 1,#p do
t.children[i] = a .. {
t[i] = a .. {
Name = tostring(i);
InitCommand = function(self)
if i < math.ceil(#p/2) then self:horizalign("HorizAlign_Right");
@@ -52,7 +51,7 @@ for i = 1,#p do
};
local Width = p[i];
t.children[i].Frames =
t[i].Frames =
{
{ -- state 0
{ x=TextureXPos, y=0 }, -- top-left