[default] You are not allowed to go to ScreenSelectProfile if you do not have more than 2 profiles.
@@ -1,49 +1,2 @@
|
||||
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 );
|
||||
};
|
||||
local t = Def.ActorFrame {};
|
||||
return t;
|
||||
@@ -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"));
|
||||
|
||||
@@ -65,7 +65,11 @@ Branch = {
|
||||
if SONGMAN:GetNumSongs() == 0 and SONGMAN:GetNumAdditionalSongs() == 0 then
|
||||
return "ScreenHowToInstallSongs";
|
||||
end;
|
||||
return "ScreenSelectProfile";
|
||||
if PROFILEMAN:GetNumLocalProfiles() >= 2 then
|
||||
return "ScreenSelectProfile";
|
||||
else
|
||||
return Branch.AfterSelectProfile();
|
||||
end
|
||||
end,
|
||||
OptionsEdit = function()
|
||||
-- Similar to above, don't let anyone in here with 0 songs.
|
||||
|
||||
|
Before Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 14 KiB |
@@ -1,512 +0,0 @@
|
||||
local t = Def.ActorFrame{}
|
||||
|
||||
local newBPS;
|
||||
local oldBPS;
|
||||
|
||||
|
||||
-- DECORATIONS ////////////////////////
|
||||
|
||||
-- Left Hex Corner Decoration
|
||||
t[#t+1] = LoadActor("decoration_corner") .. {
|
||||
InitCommand=cmd(visible,GAMESTATE:IsHumanPlayer(PLAYER_1));
|
||||
OnCommand=cmd(horizalign,left;x,SCREEN_LEFT;vertalign,top;y,SCREEN_TOP;zoomy,0.4;zoomx,0.6;diffusealpha,0.3;blend,Blend.Add);
|
||||
};
|
||||
|
||||
-- Right Hex Corner Decoration
|
||||
t[#t+1] = LoadActor("decoration_corner") .. {
|
||||
InitCommand=cmd(visible,GAMESTATE:IsHumanPlayer(PLAYER_2));
|
||||
OnCommand=cmd(horizalign,left;x,SCREEN_RIGHT;vertalign,top;y,SCREEN_TOP;zoomy,0.4;;zoomx,-0.6;diffusealpha,0.3;blend,Blend.Add);
|
||||
};
|
||||
|
||||
|
||||
-- WAVY LINE (thanks AJ) ////////////////////////
|
||||
|
||||
|
||||
--P1
|
||||
t[#t+1] = LoadActor("hot_lores") .. {
|
||||
OnCommand=cmd(diffusealpha,0;visible,GAMESTATE:IsHumanPlayer(PLAYER_1);horizalign,left;x,SCREEN_LEFT+18;vertalign,top;y,SCREEN_TOP+16;zoomtowidth,SCREEN_WIDTH/2-26;texcoordvelocity,0.1,0;queuecommand,"Begin");
|
||||
BeginCommand=function(self)
|
||||
local style = GAMESTATE:GetCurrentStyle();
|
||||
if style:GetStyleType() == "StyleType_OnePlayerTwoSides" then
|
||||
self:visible(false);
|
||||
else
|
||||
local move = GAMESTATE:GetSongBPS()/2
|
||||
if GAMESTATE:GetSongFreeze() then
|
||||
move = 0;
|
||||
end
|
||||
self:texcoordvelocity(move,0);
|
||||
self:sleep(0.001);
|
||||
self:queuecommand("Begin");
|
||||
end;
|
||||
end;
|
||||
LifeChangedMessageCommand=function(self,params)
|
||||
if params.Player == PLAYER_1 then
|
||||
local lifeP1=params.LifeMeter:GetLife();
|
||||
if lifeP1>=THEME:GetMetric("LifeMeterBar", "HotValue") then
|
||||
self:diffusealpha(0.5);
|
||||
else
|
||||
self:diffusealpha(0);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
};
|
||||
|
||||
--P2
|
||||
t[#t+1] = LoadActor("hot_lores") .. {
|
||||
OnCommand=cmd(diffusealpha,0;visible,GAMESTATE:IsHumanPlayer(PLAYER_2);horizalign,left;x,SCREEN_RIGHT-18;vertalign,top;y,SCREEN_TOP+16;zoomtowidth,(SCREEN_WIDTH/2-26)*-1;texcoordvelocity,0.1,0;queuecommand,"Begin");
|
||||
BeginCommand=function(self)
|
||||
local style = GAMESTATE:GetCurrentStyle();
|
||||
if style:GetStyleType() == "StyleType_OnePlayerTwoSides" then
|
||||
self:visible(false);
|
||||
else
|
||||
local move = GAMESTATE:GetSongBPS()/2
|
||||
if GAMESTATE:GetSongFreeze() then
|
||||
move = 0;
|
||||
end
|
||||
self:texcoordvelocity(move,0);
|
||||
self:sleep(0.001);
|
||||
self:queuecommand("Begin");
|
||||
end;
|
||||
end;
|
||||
LifeChangedMessageCommand=function(self,params)
|
||||
if params.Player == PLAYER_2 then
|
||||
local lifeP2=params.LifeMeter:GetLife();
|
||||
if lifeP2>=THEME:GetMetric("LifeMeterBar", "HotValue") then
|
||||
self:diffusealpha(0.5);
|
||||
else
|
||||
self:diffusealpha(0);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
};
|
||||
|
||||
--Double
|
||||
--customtexturerect,0,0,[PixelsToCoverWidth]/[ImageWidth],[PixelsToCoverHeight]/[ImageHeight]
|
||||
--I said that I was gonna write it down. thx midi
|
||||
|
||||
t[#t+1] = LoadActor("hot_lores") .. {
|
||||
OnCommand=cmd(diffusealpha,0;horizalign,left;x,SCREEN_LEFT+18;vertalign,top;y,SCREEN_TOP+16;zoomtowidth,SCREEN_WIDTH-36;texcoordvelocity,0.1,0;customtexturerect,0,0,600/(SCREEN_WIDTH-36),1;queuecommand,"Begin");
|
||||
BeginCommand=function(self)
|
||||
local style = GAMESTATE:GetCurrentStyle();
|
||||
if style:GetStyleType() == "StyleType_OnePlayerTwoSides" then
|
||||
local move = GAMESTATE:GetSongBPS()/2
|
||||
if GAMESTATE:GetSongFreeze() then
|
||||
move = 0;
|
||||
end
|
||||
self:texcoordvelocity(move,0);
|
||||
self:sleep(0.001);
|
||||
self:queuecommand("Begin");
|
||||
else
|
||||
self:visible(false);
|
||||
end;
|
||||
end;
|
||||
LifeChangedMessageCommand=function(self,params)
|
||||
local life=params.LifeMeter:GetLife();
|
||||
if life>=THEME:GetMetric("LifeMeterBar", "HotValue") then
|
||||
self:diffusealpha(0.5);
|
||||
else
|
||||
self:diffusealpha(0);
|
||||
end;
|
||||
end;
|
||||
};
|
||||
|
||||
|
||||
-- DANGER ////////////////////////
|
||||
|
||||
|
||||
--DANGER P1 single
|
||||
t[#t+1] = LoadActor("danger") .. {
|
||||
InitCommand=cmd(visible,GAMESTATE:IsHumanPlayer(PLAYER_1);horizalign,left;x,SCREEN_LEFT+18;vertalign,top;y,SCREEN_TOP+16;zoomtowidth,SCREEN_WIDTH/2-26;zoomy,0.5);
|
||||
OnCommand=cmd(effectclock,"bgm";diffusealpha,1;linear,0.2;diffusealpha,0.25;linear,0.2;diffusealpha,1;queuecommand,"On");
|
||||
LifeChangedMessageCommand=function(self,params)
|
||||
if params.Player == PLAYER_1 then
|
||||
local lifeP1 = params.LifeMeter:GetLife();
|
||||
if lifeP1 <= THEME:GetMetric("LifeMeterBar", "DangerThreshold") then
|
||||
local style = GAMESTATE:GetCurrentStyle();
|
||||
if style:GetStyleType() == "StyleType_OnePlayerTwoSides" then
|
||||
self:visible(false);
|
||||
else
|
||||
self:visible(true);
|
||||
end;
|
||||
else
|
||||
self:visible(false);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
};
|
||||
|
||||
--DANGER P2 single
|
||||
t[#t+1] = LoadActor("danger") .. {
|
||||
InitCommand=cmd(visible,GAMESTATE:IsHumanPlayer(PLAYER_2);horizalign,right;x,SCREEN_RIGHT-18;vertalign,top;y,SCREEN_TOP+16;zoomtowidth,SCREEN_WIDTH/2-26;zoomy,0.5);
|
||||
OnCommand=cmd(effectclock,"bgm";diffusealpha,1;linear,0.2;diffusealpha,0.25;linear,0.2;diffusealpha,1;queuecommand,"On");
|
||||
LifeChangedMessageCommand=function(self,params)
|
||||
if params.Player == PLAYER_2 then
|
||||
local lifeP2 = params.LifeMeter:GetLife();
|
||||
if lifeP2 <= THEME:GetMetric("LifeMeterBar", "DangerThreshold") then
|
||||
local style = GAMESTATE:GetCurrentStyle();
|
||||
if style:GetStyleType() == "StyleType_OnePlayerTwoSides" then
|
||||
self:visible(false);
|
||||
else
|
||||
self:visible(true);
|
||||
end;
|
||||
else
|
||||
self:visible(false);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
};
|
||||
|
||||
--DANGER double
|
||||
t[#t+1] = LoadActor("danger") .. {
|
||||
InitCommand=cmd(visible,false;horizalign,center;x,SCREEN_CENTER_X;vertalign,top;y,SCREEN_TOP+16;zoomtowidth,SCREEN_WIDTH-36;zoomy,0.5);
|
||||
OnCommand=cmd(effectclock,"bgm";diffusealpha,1;linear,0.2;diffusealpha,0.25;linear,0.2;diffusealpha,1;queuecommand,"On");
|
||||
LifeChangedMessageCommand=function(self,params)
|
||||
local life = params.LifeMeter:GetLife();
|
||||
local style = GAMESTATE:GetCurrentStyle();
|
||||
if style:GetStyleType() == "StyleType_OnePlayerTwoSides" then
|
||||
if life <= THEME:GetMetric("LifeMeterBar", "DangerThreshold") then
|
||||
self:visible(true);
|
||||
else
|
||||
self:visible(false);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
};
|
||||
|
||||
|
||||
|
||||
-- METERS ////////////////////////
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
---basemeter masked P1
|
||||
t[#t+1] = LoadActor("basemeter") .. {
|
||||
InitCommand=cmd(visible,GAMESTATE:IsHumanPlayer(PLAYER_1);horizalign,left;x,SCREEN_LEFT+18;valign,0.5;y,SCREEN_TOP+41;zoomy,0.5;blend,Blend.Add);
|
||||
OnCommand=cmd(bounce;effectmagnitude,-40,0,0;effectclock,"bgm";effecttiming,2,0,0,0;);
|
||||
LifeChangedMessageCommand=function(self,params)
|
||||
if params.Player == PLAYER_1 then
|
||||
local style = GAMESTATE:GetCurrentStyle();
|
||||
local lifeP1 = params.LifeMeter:GetLife();
|
||||
if GAMESTATE:IsHumanPlayer(PLAYER_1)==true then
|
||||
if lifeP1==0 then
|
||||
self:visible(false);
|
||||
else
|
||||
|
||||
if lifeP1==1 then
|
||||
self:effectmagnitude(0,0,0);
|
||||
else
|
||||
self:effectmagnitude(-40,0,0);
|
||||
end;
|
||||
|
||||
self:visible(true);
|
||||
end
|
||||
end
|
||||
if style:GetStyleType() == "StyleType_OnePlayerTwoSides" then
|
||||
self:zoomtowidth((SCREEN_WIDTH-40)*lifeP1+5);
|
||||
else
|
||||
self:zoomtowidth((SCREEN_WIDTH/2-26)*lifeP1);
|
||||
end;
|
||||
|
||||
end;
|
||||
end;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
---basemeter masked P2
|
||||
t[#t+1] = LoadActor("basemeter") .. {
|
||||
InitCommand=cmd(visible,GAMESTATE:IsHumanPlayer(PLAYER_2);horizalign,right;x,SCREEN_RIGHT+18;valign,0.5;y,SCREEN_TOP+41;zoomy,0.5;blend,Blend.Add;queuecommand,"Set");
|
||||
OnCommand=cmd(bob;effectmagnitude,40,0,0;effectclock,"bgm";effecttiming,1,0,0,0;);
|
||||
SetCommand=function(self,params)
|
||||
local style = GAMESTATE:GetCurrentStyle();
|
||||
if style:GetStyleType() == "StyleType_OnePlayerTwoSides" then
|
||||
self:effectmagnitude(-40,0,0);
|
||||
self:horizalign(left);
|
||||
self:x(SCREEN_LEFT+18);
|
||||
end;
|
||||
end;
|
||||
|
||||
LifeChangedMessageCommand=function(self,params)
|
||||
if params.Player == PLAYER_2 then
|
||||
local style = GAMESTATE:GetCurrentStyle();
|
||||
local lifeP2 = params.LifeMeter:GetLife();
|
||||
if GAMESTATE:IsHumanPlayer(PLAYER_2)==true then
|
||||
if lifeP2==0 then
|
||||
self:visible(false);
|
||||
else
|
||||
|
||||
if lifeP2==1 then
|
||||
self:effectmagnitude(0,0,0);
|
||||
else
|
||||
if style:GetStyleType() == "StyleType_OnePlayerTwoSides" then
|
||||
self:effectmagnitude(-40,0,0);
|
||||
else
|
||||
self:effectmagnitude(40,0,0);
|
||||
end
|
||||
end;
|
||||
|
||||
self:visible(true);
|
||||
end
|
||||
end
|
||||
if style:GetStyleType() == "StyleType_OnePlayerTwoSides" then
|
||||
self:zoomtowidth((SCREEN_WIDTH-40)*lifeP2);
|
||||
else
|
||||
self:zoomtowidth(((SCREEN_WIDTH/2-26)*lifeP2)+40);
|
||||
end;
|
||||
|
||||
end;
|
||||
end;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
-- FRAMES & TIPS ////////////////////////
|
||||
|
||||
|
||||
-- Left Corner
|
||||
t[#t+1] = LoadActor("mask") .. {
|
||||
OnCommand=cmd(horizalign,right;x,SCREEN_LEFT+130;vertalign,top;y,SCREEN_TOP+12;zoom,0.45;queuecommand,"Set");
|
||||
SetCommand = function(self)
|
||||
local style = GAMESTATE:GetCurrentStyle();
|
||||
if style:GetStyleType() == "StyleType_OnePlayerTwoSides" then
|
||||
self:visible(true);
|
||||
else
|
||||
if GAMESTATE:IsHumanPlayer(PLAYER_1) == true then
|
||||
self:visible(true);
|
||||
else
|
||||
self:visible(false);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
};
|
||||
|
||||
-- Right Corner
|
||||
t[#t+1] = LoadActor("mask") .. {
|
||||
OnCommand=cmd(horizalign,right;x,SCREEN_RIGHT-130;vertalign,top;y,SCREEN_TOP+12;zoomx,-0.45;zoomy,0.45;queuecommand,"Set");
|
||||
SetCommand = function(self)
|
||||
local style = GAMESTATE:GetCurrentStyle();
|
||||
if style:GetStyleType() == "StyleType_OnePlayerTwoSides" then
|
||||
self:visible(true);
|
||||
else
|
||||
if GAMESTATE:IsHumanPlayer(PLAYER_2) == true then
|
||||
self:visible(true);
|
||||
else
|
||||
self:visible(false);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
};
|
||||
|
||||
|
||||
-- Left Corner
|
||||
t[#t+1] = LoadActor("corner") .. {
|
||||
OnCommand=cmd(horizalign,left;x,SCREEN_LEFT+15;vertalign,top;y,SCREEN_TOP+16;zoom,0.75;queuecommand,"Set");
|
||||
SetCommand = function(self)
|
||||
local style = GAMESTATE:GetCurrentStyle();
|
||||
if style:GetStyleType() == "StyleType_OnePlayerTwoSides" then
|
||||
self:visible(true);
|
||||
else
|
||||
if GAMESTATE:IsHumanPlayer(PLAYER_1) == true then
|
||||
self:visible(true);
|
||||
else
|
||||
self:visible(false);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
};
|
||||
|
||||
-- Right Corner
|
||||
t[#t+1] = LoadActor("corner") .. {
|
||||
OnCommand=cmd(horizalign,left;x,SCREEN_RIGHT-15;vertalign,top;y,SCREEN_TOP+16;zoomx,-0.75;zoomy,0.75;queuecommand,"Set");
|
||||
SetCommand = function(self)
|
||||
local style = GAMESTATE:GetCurrentStyle();
|
||||
if style:GetStyleType() == "StyleType_OnePlayerTwoSides" then
|
||||
self:visible(true);
|
||||
else
|
||||
if GAMESTATE:IsHumanPlayer(PLAYER_2) == true then
|
||||
self:visible(true);
|
||||
else
|
||||
self:visible(false);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
};
|
||||
|
||||
-- Center Corner Left
|
||||
t[#t+1] = LoadActor("center") .. {
|
||||
OnCommand=cmd(horizalign,left;x,SCREEN_CENTER_X+5;vertalign,top;y,SCREEN_TOP+16;zoomx,-0.75;zoomy,0.75;queuecommand,"Set");
|
||||
SetCommand = function(self)
|
||||
local style = GAMESTATE:GetCurrentStyle();
|
||||
if style:GetStyleType() == "StyleType_OnePlayerTwoSides" then
|
||||
self:visible(false);
|
||||
else
|
||||
if GAMESTATE:IsHumanPlayer(PLAYER_1) == true then
|
||||
self:visible(true);
|
||||
else
|
||||
self:visible(false);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
};
|
||||
|
||||
-- Center Corner Right
|
||||
t[#t+1] = LoadActor("center") .. {
|
||||
OnCommand=cmd(horizalign,left;x,SCREEN_CENTER_X-5;vertalign,top;y,SCREEN_TOP+16;zoom,0.75;queuecommand,"Set");
|
||||
SetCommand = function(self)
|
||||
local style = GAMESTATE:GetCurrentStyle();
|
||||
if style:GetStyleType() == "StyleType_OnePlayerTwoSides" then
|
||||
self:visible(false);
|
||||
else
|
||||
if GAMESTATE:IsHumanPlayer(PLAYER_2) == true then
|
||||
self:visible(true);
|
||||
else
|
||||
self:visible(false);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
};
|
||||
|
||||
-- Center part 1
|
||||
t[#t+1] = LoadActor("frame") .. {
|
||||
OnCommand=cmd(visible,GAMESTATE:IsHumanPlayer(PLAYER_1);horizalign,left;x,SCREEN_LEFT+52.5;vertalign,top;y,SCREEN_TOP+16;zoomtowidth,SCREEN_WIDTH/2-85;zoomy,0.75;queuecommand,"Set";);
|
||||
SetCommand = function(self)
|
||||
local style = GAMESTATE:GetCurrentStyle();
|
||||
if style:GetStyleType() == "StyleType_OnePlayerTwoSides" then
|
||||
self:zoomtowidth(SCREEN_WIDTH-105);
|
||||
self:visible(true)
|
||||
else
|
||||
if GAMESTATE:IsHumanPlayer(PLAYER_1) == false then
|
||||
self:visible(false)
|
||||
else
|
||||
self:visible(true)
|
||||
end
|
||||
end;
|
||||
end;
|
||||
};
|
||||
|
||||
-- Center part 2
|
||||
t[#t+1] = LoadActor("frame") .. {
|
||||
OnCommand=cmd(horizalign,right;x,SCREEN_RIGHT-52.5;vertalign,top;y,SCREEN_TOP+16;zoomtowidth,SCREEN_WIDTH/2-85;zoomy,0.75;queuecommand,"Set";);
|
||||
SetCommand = function(self)
|
||||
local style = GAMESTATE:GetCurrentStyle();
|
||||
if style:GetStyleType() == "StyleType_OnePlayerTwoSides" then
|
||||
self:visible(false)
|
||||
else
|
||||
if GAMESTATE:IsHumanPlayer(PLAYER_2) == true then
|
||||
self:visible(true)
|
||||
else
|
||||
self:visible(false)
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
};
|
||||
|
||||
|
||||
|
||||
---tip P1
|
||||
t[#t+1] = LoadActor("tip") .. {
|
||||
InitCommand=cmd(visible,GAMESTATE:IsHumanPlayer(PLAYER_1);valign,0.5;y,SCREEN_TOP+41;zoom,0.5;blend,Blend.Add;queuecommand,"Set");
|
||||
--OnCommand=cmd(bob;effectmagnitude,-40,0,0;effectclock,"bgm";effecttiming,1,0,0,0;);
|
||||
LifeChangedMessageCommand=function(self,params)
|
||||
if params.Player == PLAYER_1 then
|
||||
local style = GAMESTATE:GetCurrentStyle();
|
||||
local lifeP1 = params.LifeMeter:GetLife();
|
||||
if GAMESTATE:IsHumanPlayer(PLAYER_1)==true then
|
||||
if lifeP1==0 then
|
||||
self:visible(false);
|
||||
else
|
||||
self:visible(true);
|
||||
end
|
||||
end
|
||||
if style:GetStyleType() == "StyleType_OnePlayerTwoSides" then
|
||||
self:x((SCREEN_WIDTH-40)*lifeP1+20);
|
||||
else
|
||||
self:x((SCREEN_WIDTH/2-26)*lifeP1+20);
|
||||
end;
|
||||
|
||||
end;
|
||||
end;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
---tip P2
|
||||
t[#t+1] = LoadActor("tip") .. {
|
||||
InitCommand=cmd(visible,GAMESTATE:IsHumanPlayer(PLAYER_2);valign,0.5;y,SCREEN_TOP+41;zoom,0.5;blend,Blend.Add;);
|
||||
--OnCommand=cmd(bob;effectmagnitude,40,0,0;effectclock,"bgm";effecttiming,1,0,0,0;);
|
||||
LifeChangedMessageCommand=function(self,params)
|
||||
if params.Player == PLAYER_2 then
|
||||
local style = GAMESTATE:GetCurrentStyle();
|
||||
local lifeP2 = params.LifeMeter:GetLife();
|
||||
local fullstate;
|
||||
if GAMESTATE:IsHumanPlayer(PLAYER_2)==true then
|
||||
if lifeP2==0 then
|
||||
self:visible(false);
|
||||
else
|
||||
self:visible(true);
|
||||
end
|
||||
end
|
||||
if style:GetStyleType() == "StyleType_OnePlayerTwoSides" then
|
||||
self:x((SCREEN_WIDTH-40)*lifeP2+20);
|
||||
else
|
||||
self:x(SCREEN_RIGHT-((SCREEN_WIDTH/2-26)*lifeP2)-20);
|
||||
end;
|
||||
|
||||
end;
|
||||
end;
|
||||
|
||||
};
|
||||
|
||||
-- NAMES ////////////////////////
|
||||
|
||||
--P1 NAME
|
||||
t[#t+1] = LoadFont("Common Normal") .. {
|
||||
InitCommand=cmd(horizalign,left;x,SCREEN_LEFT+30;y,SCREEN_TOP+15;zoom,0.4;shadowlength,1;uppercase,true);
|
||||
BeginCommand=function(self)
|
||||
local profile = PROFILEMAN:GetProfile(PLAYER_1);
|
||||
local name = profile:GetDisplayName();
|
||||
|
||||
if GAMESTATE:IsHumanPlayer(PLAYER_1) == true then
|
||||
if name=="" then
|
||||
self:settext("Player 1");
|
||||
else
|
||||
self:settext( name );
|
||||
end
|
||||
end
|
||||
|
||||
end;
|
||||
|
||||
};
|
||||
|
||||
--P2 NAME
|
||||
t[#t+1] = LoadFont("Common Normal") .. {
|
||||
InitCommand=cmd(horizalign,right;x,SCREEN_RIGHT-30;y,SCREEN_TOP+15;zoom,0.4;shadowlength,1;uppercase,true);
|
||||
BeginCommand=function(self)
|
||||
local profile = PROFILEMAN:GetProfile(PLAYER_2);
|
||||
local name = profile:GetDisplayName();
|
||||
|
||||
if GAMESTATE:IsHumanPlayer(PLAYER_2) == true then
|
||||
if name=="" then
|
||||
self:settext("Player 2");
|
||||
else
|
||||
self:settext( name );
|
||||
end
|
||||
end
|
||||
end;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
return t
|
||||
|
Before Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 3.5 KiB |
@@ -1,250 +0,0 @@
|
||||
local c;
|
||||
local player = Var "Player";
|
||||
local bShowProtiming = GetUserPrefB("UserPrefProtiming" .. ToEnumShortString(player) );
|
||||
|
||||
local function MakeAverage( t )
|
||||
local sum = 0;
|
||||
for i=1,#t do
|
||||
sum = sum + t[i];
|
||||
end
|
||||
return sum / #t
|
||||
end
|
||||
|
||||
-- New
|
||||
local function PosCount( t )
|
||||
local Count = 0;
|
||||
for i=1,#t do
|
||||
if t[i] > 0 then Count = Count + 1 end
|
||||
end
|
||||
return Count
|
||||
end
|
||||
|
||||
local function NegCount( t )
|
||||
local Count = 0;
|
||||
for i=1,#t do
|
||||
if t[i] < 0 then Count = Count + 1 end
|
||||
end
|
||||
return Count
|
||||
end
|
||||
|
||||
|
||||
local function StdDev( t )
|
||||
local avg = MakeAverage( t );
|
||||
local sum = 0;
|
||||
for i=1,#t do
|
||||
sum = sum + math.pow(t[i] - avg, 2);
|
||||
end
|
||||
return math.sqrt(sum / (#t - 1))
|
||||
end
|
||||
|
||||
--
|
||||
local tTotalJudgments = {};
|
||||
-- Global?
|
||||
--[[ tPlayerData = {};
|
||||
for pn in ivalues(GAMESTATE:GetHumanPlayers())
|
||||
tPlayerData[pn].SignedJudgments = {};
|
||||
tPlayerData[pn].AverageDifference = 0;
|
||||
tPlayerData[pn].AbsoluteDifference = 0;
|
||||
tPlayerData[pn].StandardDeviation = 0;
|
||||
tPlayerData[pn].StandardDeviation = 0;
|
||||
tPlayerData[pn].Early = 0;
|
||||
tPlayerData[pn].Late = 0;
|
||||
end ]]
|
||||
--
|
||||
local JudgeCmds = {
|
||||
TapNoteScore_W1 = THEME:GetMetric( "Judgment", "JudgmentW1Command" );
|
||||
TapNoteScore_W2 = THEME:GetMetric( "Judgment", "JudgmentW2Command" );
|
||||
TapNoteScore_W3 = THEME:GetMetric( "Judgment", "JudgmentW3Command" );
|
||||
TapNoteScore_W4 = THEME:GetMetric( "Judgment", "JudgmentW4Command" );
|
||||
TapNoteScore_W5 = THEME:GetMetric( "Judgment", "JudgmentW5Command" );
|
||||
TapNoteScore_Miss = THEME:GetMetric( "Judgment", "JudgmentMissCommand" );
|
||||
};
|
||||
|
||||
local ProtimingCmds = {
|
||||
TapNoteScore_W1 = THEME:GetMetric( "Protiming", "ProtimingW1Command" );
|
||||
TapNoteScore_W2 = THEME:GetMetric( "Protiming", "ProtimingW2Command" );
|
||||
TapNoteScore_W3 = THEME:GetMetric( "Protiming", "ProtimingW3Command" );
|
||||
TapNoteScore_W4 = THEME:GetMetric( "Protiming", "ProtimingW4Command" );
|
||||
TapNoteScore_W5 = THEME:GetMetric( "Protiming", "ProtimingW5Command" );
|
||||
TapNoteScore_Miss = THEME:GetMetric( "Protiming", "ProtimingMissCommand" );
|
||||
};
|
||||
|
||||
local AverageCmds = {
|
||||
Pulse = THEME:GetMetric( "Protiming", "AveragePulseCommand" );
|
||||
};
|
||||
|
||||
local TNSFrames = {
|
||||
TapNoteScore_W1 = 0;
|
||||
TapNoteScore_W2 = 1;
|
||||
TapNoteScore_W3 = 2;
|
||||
TapNoteScore_W4 = 3;
|
||||
TapNoteScore_W5 = 4;
|
||||
TapNoteScore_Miss = 5;
|
||||
};
|
||||
local t = Def.ActorFrame {};
|
||||
t[#t+1] = Def.ActorFrame {
|
||||
LoadActor(THEME:GetPathG("Judgment","Normal")) .. {
|
||||
Name="Judgment";
|
||||
InitCommand=cmd(pause;visible,false);
|
||||
OnCommand=THEME:GetMetric("Judgment","JudgmentOnCommand");
|
||||
ResetCommand=cmd(finishtweening;stopeffect;visible,false);
|
||||
};
|
||||
LoadFont("Combo Numbers") .. {
|
||||
Name="ProtimingDisplay";
|
||||
Text="";
|
||||
InitCommand=cmd(visible,false);
|
||||
OnCommand=THEME:GetMetric("Protiming","ProtimingOnCommand");
|
||||
ResetCommand=cmd(finishtweening;stopeffect;visible,false);
|
||||
};
|
||||
LoadFont("Common Normal") .. {
|
||||
Name="ProtimingAverage";
|
||||
Text="";
|
||||
InitCommand=cmd(visible,false);
|
||||
OnCommand=THEME:GetMetric("Protiming","AverageOnCommand");
|
||||
ResetCommand=cmd(finishtweening;stopeffect;visible,false);
|
||||
};
|
||||
Def.Quad {
|
||||
Name="ProtimingGraphBG";
|
||||
InitCommand=cmd(visible,false;y,32;zoomto,192,16);
|
||||
ResetCommand=cmd(finishtweening;diffusealpha,0.8;visible,false);
|
||||
OnCommand=cmd(diffuse,Color("Black");diffusetopedge,color("0.1,0.1,0.1,1");diffusealpha,0.8;shadowlength,2;);
|
||||
};
|
||||
Def.Quad {
|
||||
Name="ProtimingGraphWindowW3";
|
||||
InitCommand=cmd(visible,false;y,32;zoomto,192-4,16-4);
|
||||
ResetCommand=cmd(finishtweening;diffusealpha,1;visible,false);
|
||||
OnCommand=cmd(diffuse,GameColor.Judgment["JudgmentLine_W3"];);
|
||||
};
|
||||
Def.Quad {
|
||||
Name="ProtimingGraphWindowW2";
|
||||
InitCommand=cmd(visible,false;y,32;zoomto,scale(PREFSMAN:GetPreference("TimingWindowSecondsW2"),0,PREFSMAN:GetPreference("TimingWindowSecondsW3"),0,192-4),16-4);
|
||||
ResetCommand=cmd(finishtweening;diffusealpha,1;visible,false);
|
||||
OnCommand=cmd(diffuse,GameColor.Judgment["JudgmentLine_W2"];);
|
||||
};
|
||||
Def.Quad {
|
||||
Name="ProtimingGraphWindowW1";
|
||||
InitCommand=cmd(visible,false;y,32;zoomto,scale(PREFSMAN:GetPreference("TimingWindowSecondsW1"),0,PREFSMAN:GetPreference("TimingWindowSecondsW3"),0,192-4),16-4);
|
||||
ResetCommand=cmd(finishtweening;diffusealpha,1;visible,false);
|
||||
OnCommand=cmd(diffuse,GameColor.Judgment["JudgmentLine_W1"];);
|
||||
};
|
||||
Def.Quad {
|
||||
Name="ProtimingGraphUnderlay";
|
||||
InitCommand=cmd(visible,false;y,32;zoomto,192-4,16-4);
|
||||
ResetCommand=cmd(finishtweening;diffusealpha,0.25;visible,false);
|
||||
OnCommand=cmd(diffuse,Color("Black");diffusealpha,0.25);
|
||||
};
|
||||
Def.Quad {
|
||||
Name="ProtimingGraphFill";
|
||||
InitCommand=cmd(visible,false;y,32;zoomto,0,16-4;horizalign,left;);
|
||||
ResetCommand=cmd(finishtweening;diffusealpha,1;visible,false);
|
||||
OnCommand=cmd(diffuse,Color("Red"););
|
||||
};
|
||||
Def.Quad {
|
||||
Name="ProtimingGraphAverage";
|
||||
InitCommand=cmd(visible,false;y,32;zoomto,2,7;);
|
||||
ResetCommand=cmd(finishtweening;diffusealpha,0.85;visible,false);
|
||||
OnCommand=cmd(diffuse,Color("Orange");diffusealpha,0.85);
|
||||
};
|
||||
Def.Quad {
|
||||
Name="ProtimingGraphCenter";
|
||||
InitCommand=cmd(visible,false;y,32;zoomto,2,16-4;);
|
||||
ResetCommand=cmd(finishtweening;diffusealpha,1;visible,false);
|
||||
OnCommand=cmd(diffuse,Color("White");diffusealpha,1);
|
||||
};
|
||||
InitCommand = function(self)
|
||||
c = self:GetChildren();
|
||||
end;
|
||||
|
||||
JudgmentMessageCommand=function(self, param)
|
||||
if param.Player ~= player then return end;
|
||||
if param.HoldNoteScore then return end;
|
||||
|
||||
local iNumStates = c.Judgment:GetNumStates();
|
||||
local iFrame = TNSFrames[param.TapNoteScore];
|
||||
|
||||
if not iFrame then return end
|
||||
if iNumStates == 12 then
|
||||
iFrame = iFrame * 2;
|
||||
if not param.Early then
|
||||
iFrame = iFrame + 1;
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
local fTapNoteOffset = param.TapNoteOffset;
|
||||
if param.HoldNoteScore then
|
||||
fTapNoteOffset = 1;
|
||||
else
|
||||
fTapNoteOffset = param.TapNoteOffset;
|
||||
end
|
||||
|
||||
if param.TapNoteScore == 'TapNoteScore_Miss' then
|
||||
fTapNoteOffset = 1;
|
||||
bUseNegative = true;
|
||||
else
|
||||
-- fTapNoteOffset = fTapNoteOffset;
|
||||
bUseNegative = false;
|
||||
end;
|
||||
|
||||
if fTapNoteOffset ~= 1 then
|
||||
-- we're safe, you can push the values
|
||||
tTotalJudgments[#tTotalJudgments+1] = bUseNegative and fTapNoteOffset or math.abs( fTapNoteOffset );
|
||||
-- New
|
||||
-- tPlayerData[player].SignedJudgments[#(tPlayerData[player].SignedJudgments)+1] = fTapNoteOffset;
|
||||
-- table.getn(tPlayerData[player].SignedJudgments = bUseNegative and fTapNoteOffset or fTapNoteOffset;
|
||||
end
|
||||
|
||||
self:playcommand("Reset");
|
||||
|
||||
c.Judgment:visible( not bShowProtiming );
|
||||
c.Judgment:setstate( iFrame );
|
||||
JudgeCmds[param.TapNoteScore](c.Judgment);
|
||||
|
||||
c.ProtimingDisplay:visible( bShowProtiming );
|
||||
c.ProtimingDisplay:settextf("%i",math.abs(fTapNoteOffset * 1000));
|
||||
ProtimingCmds[param.TapNoteScore](c.ProtimingDisplay);
|
||||
|
||||
c.ProtimingAverage:visible( bShowProtiming );
|
||||
c.ProtimingAverage:settextf("%.2f%%",clamp(100 - MakeAverage( tTotalJudgments ) * 1000 ,0,100));
|
||||
AverageCmds['Pulse'](c.ProtimingAverage);
|
||||
|
||||
c.ProtimingGraphBG:visible( bShowProtiming );
|
||||
c.ProtimingGraphUnderlay:visible( bShowProtiming );
|
||||
c.ProtimingGraphWindowW3:visible( bShowProtiming );
|
||||
c.ProtimingGraphWindowW2:visible( bShowProtiming );
|
||||
c.ProtimingGraphWindowW1:visible( bShowProtiming );
|
||||
c.ProtimingGraphFill:visible( bShowProtiming );
|
||||
c.ProtimingGraphFill:finishtweening();
|
||||
c.ProtimingGraphFill:decelerate(1/60);
|
||||
-- c.ProtimingGraphFill:zoomtowidth( clamp(fTapNoteOffset * 188,-188/2,188/2) );
|
||||
c.ProtimingGraphFill:zoomtowidth( clamp(
|
||||
scale(
|
||||
fTapNoteOffset,
|
||||
0,PREFSMAN:GetPreference("TimingWindowSecondsW3"),
|
||||
0,188/2),
|
||||
-188/2,188/2)
|
||||
);
|
||||
c.ProtimingGraphAverage:visible( bShowProtiming );
|
||||
c.ProtimingGraphAverage:zoomtowidth( clamp(
|
||||
scale(
|
||||
MakeAverage( tTotalJudgments ),
|
||||
0,PREFSMAN:GetPreference("TimingWindowSecondsW3"),
|
||||
0,188),
|
||||
0,188)
|
||||
);
|
||||
-- c.ProtimingGraphAverage:zoomtowidth( clamp(MakeAverage( tTotalJudgments ) * 1880,0,188) );
|
||||
c.ProtimingGraphCenter:visible( bShowProtiming );
|
||||
(cmd(sleep,2;linear,0.5;diffusealpha,0))(c.ProtimingGraphBG);
|
||||
(cmd(sleep,2;linear,0.5;diffusealpha,0))(c.ProtimingGraphUnderlay);
|
||||
(cmd(sleep,2;linear,0.5;diffusealpha,0))(c.ProtimingGraphWindowW3);
|
||||
(cmd(sleep,2;linear,0.5;diffusealpha,0))(c.ProtimingGraphWindowW2);
|
||||
(cmd(sleep,2;linear,0.5;diffusealpha,0))(c.ProtimingGraphWindowW1);
|
||||
(cmd(sleep,2;linear,0.5;diffusealpha,0))(c.ProtimingGraphFill);
|
||||
(cmd(sleep,2;linear,0.5;diffusealpha,0))(c.ProtimingGraphAverage);
|
||||
(cmd(sleep,2;linear,0.5;diffusealpha,0))(c.ProtimingGraphCenter);
|
||||
end;
|
||||
|
||||
};
|
||||
|
||||
|
||||
return t;
|
||||
@@ -1,5 +1,5 @@
|
||||
[Global]
|
||||
FallbackTheme=default
|
||||
[ScreenGameplay]
|
||||
LifeP1OnCommand=visible,false
|
||||
LifeP2OnCommand=visible,false
|
||||
# LifeP1OnCommand=visible,false
|
||||
# LifeP2OnCommand=visible,false
|
||||
@@ -1 +0,0 @@
|
||||
local t = Def.ActorFrame {};
|
||||
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 4.8 KiB |
@@ -507,6 +507,7 @@ ArtistPrependString=""
|
||||
[ScreenDebugOverlay]
|
||||
|
||||
[ScreenSystemLayer]
|
||||
ShowClock=true
|
||||
CreditsP1OnCommand=horizalign,left;vertalign,bottom;zoom,0.675;shadowlength,1;diffusebottomedge,PlayerColor(PLAYER_1);
|
||||
#
|
||||
CreditsP2OnCommand=horizalign,right;vertalign,bottom;zoom,0.675;shadowlength,1;diffusebottomedge,PlayerColor(PLAYER_2);
|
||||
|
||||