Revert "Fallback handled. Yes, I tested this."
This reverts commit 986d510a88.
This commit is contained in:
@@ -1,89 +1,90 @@
|
||||
local function CreditsText( pn )
|
||||
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
|
||||
};
|
||||
return text;
|
||||
end;
|
||||
--
|
||||
local t = Def.ActorFrame {}
|
||||
-- Aux
|
||||
t[#t+1] = LoadActor(THEME:GetPathB("ScreenSystemLayer","aux"));
|
||||
-- Credits
|
||||
t[#t+1] = Def.ActorFrame {
|
||||
CreditsText( PLAYER_1 );
|
||||
CreditsText( PLAYER_2 );
|
||||
};
|
||||
-- Text
|
||||
t[#t+1] = Def.ActorFrame {
|
||||
Def.Quad {
|
||||
InitCommand=function(self)
|
||||
self:zoomtowidth(SCREEN_WIDTH);
|
||||
self:zoomtoheight(30);
|
||||
self:horizalign(left);
|
||||
self:vertalign(top);
|
||||
self:y(SCREEN_TOP);
|
||||
self:diffuse(color("0,0,0,0"));
|
||||
end;
|
||||
OnCommand=function(self)
|
||||
self:finishtweening();
|
||||
self:diffusealpha(0.85);
|
||||
end;
|
||||
OffCommand=function(self)
|
||||
self:sleep(3);
|
||||
self:linear(0.5);
|
||||
self:diffusealpha(0);
|
||||
end;
|
||||
};
|
||||
LoadFont("Common","Normal") .. {
|
||||
Name="Text";
|
||||
InitCommand=function(self)
|
||||
self:maxwidth(750);
|
||||
self:horizalign(left);
|
||||
self:vertalign(top);
|
||||
self:y(SCREEN_TOP + 10);
|
||||
self:x(SCREEN_LEFT + 10);
|
||||
self:shadowlength(1);
|
||||
self:diffusealpha(0);
|
||||
end;
|
||||
OnCommand=function(self)
|
||||
self:finishtweening();
|
||||
self:diffusealpha(1);
|
||||
self:zoom(0.5);
|
||||
end;
|
||||
OffCommand=function(self)
|
||||
self:sleep(3);
|
||||
self:linear(0.5);
|
||||
self:diffusealpha(0);
|
||||
end;
|
||||
};
|
||||
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 = function(self)
|
||||
self:finishtweening();
|
||||
end;
|
||||
};
|
||||
|
||||
return t;
|
||||
local function CreditsText( pn )
|
||||
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
|
||||
};
|
||||
return text;
|
||||
end;
|
||||
|
||||
--[[ 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 {}
|
||||
-- Aux
|
||||
t[#t+1] = LoadActor(THEME:GetPathB("ScreenSystemLayer","aux"));
|
||||
-- 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);
|
||||
};
|
||||
|
||||
return t;
|
||||
|
||||
Reference in New Issue
Block a user