[default] You are not allowed to go to ScreenSelectProfile if you do not have more than 2 profiles.

This commit is contained in:
Jonathan Payne
2011-06-25 14:36:26 -07:00
parent f8f5a2674f
commit c71789b7e7
19 changed files with 55 additions and 814 deletions
@@ -1,4 +1,50 @@
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");
end;
UpdateTextCommand=function(self)
local str = ScreenSystemLayerHelpers.GetCreditsMessage(pn);
self:settext(str);
end;
UpdateVisibleCommand=function(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;
--[[ RefreshCreditTextMessageCommand=update;
CoinInsertedMessageCommand=update;
PlayerJoinedMessageCommand=update;
ScreenChangedMessageCommand=UpdateVisible; --]]
};
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"));