Files
itgmania212121/stepmania/Themes/default/BGAnimations/ScreenSystemLayer overlay.lua
T

60 lines
1.7 KiB
Lua
Raw Normal View History

2007-05-01 19:45:51 +00:00
local function CreditsText( pn )
2007-02-15 11:31:29 +00:00
function update(self)
local str = ScreenSystemLayerHelpers.GetCreditsMessage(pn);
self:settext(str);
end
2007-02-26 01:36:59 +00:00
function UpdateVisible(self)
local screen = SCREENMAN:GetTopScreen();
local bShow = true;
if screen then
local sClass = screen:GetName();
bShow = THEME:GetMetric( sClass, "ShowCoinsAndCredits" );
end
self:visible( bShow );
end
local text = LoadFont(Var "LoadingScreen","credits") .. {
InitCommand=THEME:GetMetric(Var "LoadingScreen","CreditsInitCommand");
2007-02-15 11:31:29 +00:00
RefreshCreditTextMessageCommand=update;
CoinInsertedMessageCommand=update;
PlayerJoinedMessageCommand=update;
2007-02-26 01:36:59 +00:00
ScreenChangedMessageCommand=UpdateVisible;
2007-02-15 11:31:29 +00:00
};
return text;
end
local t = Def.ActorFrame {
children = {
2007-02-16 07:46:43 +00:00
LoadFont(Var "LoadingScreen","message") .. {
2007-02-16 03:37:49 +00:00
InitCommand=cmd(maxwidth,750;
horizalign,left;vertalign,top;
zoom,0.8;shadowlength,2;
y,SCREEN_TOP+20;
diffusealpha,0
);
2007-02-15 11:31:29 +00:00
2007-02-16 02:25:24 +00:00
SystemMessageMessageCommand = function(self, params)
self:settext( params.Message );
2007-02-16 03:37:49 +00:00
local f = cmd(finishtweening;x,SCREEN_LEFT+20;diffusealpha,1;addx,-SCREEN_WIDTH;linear,0.5;addx,SCREEN_WIDTH); f(self);
2007-02-15 11:31:29 +00:00
self:playcommand( "On" );
2007-02-16 02:25:24 +00:00
if params.NoAnimate then
self:finishtweening();
end
2007-02-16 03:37:49 +00:00
f = cmd(sleep,5;linear,0.5;diffusealpha,0); f(self);
2007-02-15 11:31:29 +00:00
self:playcommand( "Off" );
end;
2007-02-16 03:37:49 +00:00
HideSystemMessageMessageCommand = cmd(finishtweening);
2007-02-15 11:31:29 +00:00
};
CreditsText( PLAYER_1 ) .. {
2007-02-26 01:36:59 +00:00
InitCommand=cmd(x,THEME:GetMetric(Var "LoadingScreen","CreditsP1X");y,THEME:GetMetric(Var "LoadingScreen","CreditsP1Y"););
2007-02-15 11:31:29 +00:00
};
CreditsText( PLAYER_2 ) .. {
2007-02-26 01:36:59 +00:00
InitCommand=cmd(x,THEME:GetMetric(Var "LoadingScreen","CreditsP2X");y,THEME:GetMetric(Var "LoadingScreen","CreditsP2Y"););
2007-02-15 11:31:29 +00:00
};
};
};
return t;