it begins.

This commit is contained in:
Jonathan Payne
2011-08-21 19:39:15 -07:00
parent faa79db48d
commit 63b10eb97b
2 changed files with 71 additions and 53 deletions
@@ -1,24 +1,8 @@
local function CreditsText( pn )
function update(self)
local str = ScreenSystemLayerHelpers.GetCreditsMessage(pn);
self:settext(str);
end
function UpdateVisible(self)
local screen = SCREENMAN:GetTopScreen();
local bShow = true;
if screen then
local sClass = screen:GetName();
bShow = THEME:GetMetric( sClass, "ShowCreditDisplay" );
end
self:visible( bShow );
end
local text = LoadFont(Var "LoadingScreen","credits") .. {
InitCommand=function(self)
self:name("Credits" .. PlayerNumberToString(pn))
ActorUtil.LoadAllCommandsAndSetXY(self,Var "LoadingScreen");
-- ActorUtil.LoadAllCommandsAndSetXY(self,Var "LoadingScreen");
end;
UpdateTextCommand=function(self)
local str = ScreenSystemLayerHelpers.GetCreditsMessage(pn);
@@ -33,40 +17,74 @@ local function CreditsText( pn )
end
self:visible( bShow );
end;
--[[ RefreshCreditTextMessageCommand=update;
CoinInsertedMessageCommand=update;
PlayerJoinedMessageCommand=update;
ScreenChangedMessageCommand=UpdateVisible; --]]
end
};
return text;
end;
--
local t = Def.ActorFrame {
CreditsText( PLAYER_1 );
CreditsText( PLAYER_2 );
Def.ActorFrame {
Def.Quad {
InitCommand=cmd(zoomtowidth,SCREEN_WIDTH;zoomtoheight,30;horizalign,left;vertalign,top;y,SCREEN_TOP;diffuse,color("0,0,0,0"));
OnCommand=cmd(finishtweening;diffusealpha,0.85;);
OffCommand=cmd(sleep,3;linear,0.5;diffusealpha,0;);
};
LoadFont("Common","Normal") .. {
Name="Text";
InitCommand=cmd(maxwidth,750;horizalign,left;vertalign,top;y,SCREEN_TOP+10;x,SCREEN_LEFT+10;shadowlength,1;diffusealpha,0;);
OnCommand=cmd(finishtweening;diffusealpha,1;zoom,0.5);
OffCommand=cmd(sleep,3;linear,0.5;diffusealpha,0;);
};
SystemMessageMessageCommand = function(self, params)
self:GetChild("Text"):settext( params.Message );
self:playcommand( "On" );
if params.NoAnimate then
self:finishtweening();
end
self:playcommand( "Off" );
end;
HideSystemMessageMessageCommand = cmd(finishtweening);
local function PlayerPane( PlayerNumber )
local t = Def.ActorFrame {
InitCommand=function(self)
self:name("PlayerPane" .. PlayerNumberToString(PlayerNumber));
-- ActorUtil.LoadAllCommandsAndSetXY(self,Var "LoadingScreen");
end
};
t[#t+1] = Def.ActorFrame {
Name = "Background";
Def.Quad {
InitCommand=cmd(zoomto,160,28;queuecommand,"On");
OnCommand=cmd(diffuse,PlayerColor(PlayerNumber);fadebottom,1);
};
};
t[#t+1] = LoadFont("Common","Normal") .. {
Name = "PlayerText";
InitCommand=cmd(x,-60;maxwidth,80/0.5;zoom,0.5;queuecommand,"On");
OnCommand=cmd(playcommand,"Set");
SetCommand=function(self)
local profile = PROFILEMAN:GetProfile( PlayerNumber) or PROFILEMAN:GetMachineProfile()
if profile then
self:settext( profile:GetDisplayName() );
else
self:settext( "NoProf" );
end
end;
};
return t
end
--
local t = Def.ActorFrame {}
-- Credits
t[#t+1] = Def.ActorFrame {
--[[ PlayerPane( PLAYER_1 ) .. {
InitCommand=cmd(x,scale(0.125,0,1,SCREEN_LEFT,SCREEN_WIDTH);y,SCREEN_BOTTOM-16)
}; --]]
CreditsText( PLAYER_1 );
CreditsText( PLAYER_2 );
};
-- Text
t[#t+1] = Def.ActorFrame {
Def.Quad {
InitCommand=cmd(zoomtowidth,SCREEN_WIDTH;zoomtoheight,30;horizalign,left;vertalign,top;y,SCREEN_TOP;diffuse,color("0,0,0,0"));
OnCommand=cmd(finishtweening;diffusealpha,0.85;);
OffCommand=cmd(sleep,3;linear,0.5;diffusealpha,0;);
};
LoadFont("Common","Normal") .. {
Name="Text";
InitCommand=cmd(maxwidth,750;horizalign,left;vertalign,top;y,SCREEN_TOP+10;x,SCREEN_LEFT+10;shadowlength,1;diffusealpha,0;);
OnCommand=cmd(finishtweening;diffusealpha,1;zoom,0.5);
OffCommand=cmd(sleep,3;linear,0.5;diffusealpha,0;);
};
SystemMessageMessageCommand = function(self, params)
self:GetChild("Text"):settext( params.Message );
self:playcommand( "On" );
if params.NoAnimate then
self:finishtweening();
end
self:playcommand( "Off" );
end;
HideSystemMessageMessageCommand = cmd(finishtweening);
};
-- Aux
t[#t+1] = LoadActor(THEME:GetPathB("ScreenSystemLayer","aux"));
return t;
+6 -6
View File
@@ -542,13 +542,13 @@ FooterOffCommand=
ShowHelp=true
HelpX=SCREEN_CENTER_X
HelpY=SCREEN_BOTTOM-16
HelpOnCommand=SetSecsBetweenSwitches,4;shadowlength,1;strokecolor,Color("Black");draworder,105;zoomy,0;linear,0.175;zoom,1*0.675;maxwidth,(640*0.75)/0.5;
HelpOnCommand=SetSecsBetweenSwitches,4;zoom,0.675;maxwidth,480/0.675;shadowlength,1;strokecolor,Color("Black");draworder,105;zoomy,0;zoom,1*0.675;linear,0.175
HelpOffCommand=linear,0.175;zoomy,0
AlternateHelpDisplayX=SCREEN_CENTER_X
AlternateHelpDisplayY=SCREEN_BOTTOM-16
# AlternateHelpDisplayOnCommand=draworder,105;
AlternateHelpDisplayOnCommand=SetSecsBetweenSwitches,4;shadowlength,1;strokecolor,Color("Black");draworder,105;zoomy,0;linear,0.175;zoom,1*0.675;maxwidth,(640*0.75)/0.5;;diffusealpha,0
AlternateHelpDisplayOnCommand=SetSecsBetweenSwitches,4;zoom,0.675;maxwidth,480/0.675;shadowlength,1;strokecolor,Color("Black");draworder,105;zoomy,0;linear,0.175;zoom,1*0.675;diffusealpha,0
AlternateHelpDisplayOffCommand=linear,0.175;zoomy,0
TimerX=SCREEN_RIGHT-36-4
@@ -836,14 +836,14 @@ SelectMenuAvailable=true
# ModeMenuAvailable=(getenv(sMode) == Normal)
# HelpDisplay has things added here to make sure it disappears for another
# actor, which we defined in this screens decorations.
HelpSelectMenuOpenedMessageCommand=basezoom,0.75;finishtweening;zoom,1;bouncebegin,0.25;diffusealpha,0;zoom,0.75
HelpSelectMenuClosedMessageCommand=basezoom,0.75;finishtweening;zoom,1.25;bounceend,0.125;diffusealpha,1;zoom,1
HelpSelectMenuOpenedMessageCommand=stoptweening;maxwidth,480/0.675;zoom,0.675;accelerate,0.125;diffusealpha,0;zoom,0.675*0.75;
HelpSelectMenuClosedMessageCommand=stoptweening;maxwidth,480/0.675;zoom,0.675*0.75;bouncebegin,0.125;diffusealpha,1;zoom,0.675
# Clone everything from HelpDisplay: we're lazy
ShowAlternateHelpDisplay=true
# AlternateHelpDisplaySelectMenuOpenedMessageCommand=stoptweening;y,SCREEN_BOTTOM-16;accelerate,0.0725/2;y,SCREEN_BOTTOM-16-16;diffusealpha,1;decelerate,0.0725/2;y,SCREEN_BOTTOM-16-32;
# AlternateHelpDisplaySelectMenuClosedMessageCommand=stoptweening;y,SCREEN_BOTTOM-16;smooth,0.125;y,SCREEN_BOTTOM-16;diffusealpha,0;
AlternateHelpDisplaySelectMenuOpenedMessageCommand=basezoom,0.75;finishtweening;zoom,1;bouncebegin,0.125;diffusealpha,1;zoom,1
AlternateHelpDisplaySelectMenuClosedMessageCommand=basezoom,0.75;finishtweening;zoom,1;bounceend,0.25;diffusealpha,0;zoom,0.75
AlternateHelpDisplaySelectMenuOpenedMessageCommand=stoptweening;maxwidth,480/0.675;zoom,0.675*1.25;bounceend,0.2;diffusealpha,1;zoom,0.675;
AlternateHelpDisplaySelectMenuClosedMessageCommand=stoptweening;maxwidth,480/0.675;zoom,0.675;accelerate,0.125;diffusealpha,0;zoom,0.675*0.75;
#
MusicWheelX=SCREEN_CENTER_X+160
MusicWheelY=SCREEN_CENTER_Y