Remove the 'home' and 'legacy' themes
@@ -1,3 +0,0 @@
|
||||
[ThemeInfo]
|
||||
DisplayName=Home (customized default)
|
||||
Author=you!
|
||||
@@ -1,5 +0,0 @@
|
||||
# DO NOT EDIT THIS SECTION #####################################################
|
||||
[Global]
|
||||
FallbackTheme=default
|
||||
|
||||
# Now you can edit or add things. ##############################################
|
||||
@@ -1,10 +0,0 @@
|
||||
return Def.ActorFrame {
|
||||
Def.Quad {
|
||||
InitCommand=cmd(Center;zoomto,SCREEN_WIDTH+1,SCREEN_HEIGHT);
|
||||
OnCommand=cmd(diffuse,color("0,0,0,0.5");sleep,5/60;diffusealpha,1;sleep,5/60);
|
||||
};
|
||||
LoadActor(THEME:GetPathS("_Screen","cancel")) .. {
|
||||
IsAction= true,
|
||||
StartTransitioningCommand=cmd(play);
|
||||
};
|
||||
};
|
||||
@@ -1,8 +0,0 @@
|
||||
local fSleepTime = THEME:GetMetric( Var "LoadingScreen","ScreenInDelay");
|
||||
|
||||
return Def.ActorFrame {
|
||||
Def.Quad {
|
||||
InitCommand=cmd(Center;zoomto,SCREEN_WIDTH+1,SCREEN_HEIGHT);
|
||||
OnCommand=cmd(diffuse,color("0,0,0,1");sleep,fSleepTime;linear,0.01;diffusealpha,0);
|
||||
};
|
||||
};
|
||||
@@ -1,8 +0,0 @@
|
||||
local fSleepTime = THEME:GetMetric( Var "LoadingScreen","ScreenOutDelay");
|
||||
|
||||
return Def.ActorFrame {
|
||||
Def.Quad {
|
||||
InitCommand=cmd(Center;zoomto,SCREEN_WIDTH+1,SCREEN_HEIGHT);
|
||||
OnCommand=cmd(diffuse,color("0,0,0,0");sleep,fSleepTime;linear,0.01;diffusealpha,1);
|
||||
};
|
||||
};
|
||||
|
Before Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 13 KiB |
@@ -1,46 +0,0 @@
|
||||
local t = Def.ActorFrame {};
|
||||
|
||||
-- Fade
|
||||
t[#t+1] = Def.ActorFrame {
|
||||
InitCommand=cmd(Center);
|
||||
Def.Quad {
|
||||
InitCommand=cmd(scaletoclipped,SCREEN_WIDTH,SCREEN_HEIGHT);
|
||||
OnCommand=cmd(diffuse,Color.Black;diffusealpha,0;linear,0.5;diffusealpha,0.75);
|
||||
OffCommand=cmd(linear,0.25;diffusealpha,0);
|
||||
};
|
||||
};
|
||||
-- Emblem
|
||||
t[#t+1] = Def.ActorFrame {
|
||||
InitCommand=cmd(Center);
|
||||
OnCommand=cmd(diffusealpha,0.5);
|
||||
LoadActor("_warning bg") .. {
|
||||
OnCommand=cmd(diffuse,Color.Yellow);
|
||||
};
|
||||
Def.ActorFrame {
|
||||
LoadActor("_exclamation") .. {
|
||||
OnCommand=cmd(diffuse,Color.Yellow);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
-- Text
|
||||
t[#t+1] = Def.ActorFrame {
|
||||
InitCommand=cmd(Center;y,SCREEN_CENTER_Y);
|
||||
OnCommand=cmd(addy,-96);
|
||||
-- Underline
|
||||
Def.Quad {
|
||||
InitCommand=cmd(y,24;zoomto,256,2);
|
||||
OnCommand=cmd(diffuse,color("#ffd400");shadowcolor,BoostColor(color("#ffd40077"),0.25);linear,0.25;zoomtowidth,256;fadeleft,0.25;faderight,0.25);
|
||||
};
|
||||
LoadFont("Common Large") .. {
|
||||
Text=Screen.String("Caution");
|
||||
OnCommand=cmd(skewx,-0.125;diffuse,color("#ffd400");strokecolor,ColorDarkTone(color("#ffd400")));
|
||||
};
|
||||
LoadFont("Common Normal") .. {
|
||||
Text=Screen.String("CautionText");
|
||||
InitCommand=cmd(y,128);
|
||||
OnCommand=cmd(strokecolor,color("0,0,0,0.5");shadowlength,1;wrapwidthpixels,SCREEN_WIDTH-80);
|
||||
};
|
||||
};
|
||||
--
|
||||
return t
|
||||
@@ -1,34 +0,0 @@
|
||||
local timer_seconds = THEME:GetMetric(Var "LoadingScreen","TimerSeconds");
|
||||
local t = Def.ActorFrame {};
|
||||
|
||||
-- Fade
|
||||
t[#t+1] = Def.ActorFrame {
|
||||
InitCommand=cmd(Center);
|
||||
Def.Quad {
|
||||
InitCommand=cmd(scaletoclipped,SCREEN_WIDTH,SCREEN_HEIGHT);
|
||||
OnCommand=cmd(diffuse,Color.Black;diffusealpha,0;linear,0.5;diffusealpha,0.25;
|
||||
sleep,timer_seconds/2;
|
||||
linear,timer_seconds/2-0.5;diffusealpha,1);
|
||||
};
|
||||
-- Warning Fade
|
||||
Def.Quad {
|
||||
InitCommand=cmd(y,16;scaletoclipped,SCREEN_WIDTH,148);
|
||||
OnCommand=cmd(diffuse,Color.Black;diffusealpha,0.5;
|
||||
linear,timer_seconds;zoomtoheight,148*0.75);
|
||||
}
|
||||
};
|
||||
--
|
||||
t[#t+1] = Def.ActorFrame {
|
||||
InitCommand=cmd(Center;y,SCREEN_CENTER_Y-24);
|
||||
-- Underline
|
||||
Def.Quad {
|
||||
InitCommand=cmd(y,16;zoomto,256,1);
|
||||
OnCommand=cmd(diffuse,color("#ffd400");shadowlength,1;shadowcolor,BoostColor(color("#ffd40077"),0.25);linear,0.25;zoomtowidth,256;fadeleft,0.25;faderight,0.25);
|
||||
};
|
||||
LoadFont("Common Bold") .. {
|
||||
Text="Continue?";
|
||||
OnCommand=cmd(skewx,-0.125;diffuse,color("#ffd400");shadowlength,2;shadowcolor,BoostColor(color("#ffd40077"),0.25));
|
||||
};
|
||||
};
|
||||
--
|
||||
return t
|
||||
|
Before Width: | Height: | Size: 111 B |
|
Before Width: | Height: | Size: 1.6 MiB |
@@ -1,20 +0,0 @@
|
||||
local scrolltime = 95;
|
||||
|
||||
local t = Def.ActorFrame {
|
||||
InitCommand=cmd(Center);
|
||||
LoadActor("_space")..{
|
||||
InitCommand=cmd(y,-SCREEN_HEIGHT*1.5;fadebottom,0.125;fadetop,0.25);
|
||||
OnCommand=cmd(linear,scrolltime;addy,SCREEN_HEIGHT*1.5825);
|
||||
};
|
||||
Def.Quad {
|
||||
InitCommand=cmd(scaletoclipped,SCREEN_WIDTH+1,SCREEN_HEIGHT);
|
||||
OnCommand=cmd(diffusecolor,color("#FFCB05");diffusebottomedge,color("#F0BA00");diffusealpha,0.45);
|
||||
};
|
||||
LoadActor("_grid")..{
|
||||
InitCommand=cmd(customtexturerect,0,0,(SCREEN_WIDTH+1)/4,SCREEN_HEIGHT/4;SetTextureFiltering,true);
|
||||
OnCommand=cmd(zoomto,SCREEN_WIDTH+1,SCREEN_HEIGHT;diffuse,Color("Black");diffuseshift;effecttiming,(1/8)*4,0,(7/8)*4,0;effectclock,'beatnooffset';
|
||||
effectcolor2,Color("Black");effectcolor1,Color.Alpha(Color("Black"),0.45);fadebottom,0.25;fadetop,0.25;croptop,48/480;cropbottom,48/480;diffusealpha,0.345);
|
||||
};
|
||||
};
|
||||
|
||||
return t
|
||||
@@ -1,65 +0,0 @@
|
||||
-- To add a section to the credits, use the following:
|
||||
-- local theme_credits= {
|
||||
-- name= "Theme Credits", -- the name of your section
|
||||
-- "Me", -- The people you want to list in your section.
|
||||
-- "Myself",
|
||||
-- "My other self",
|
||||
-- {logo= "pro_dude", name= "Pro self"}, -- Someone who has a logo image.
|
||||
-- -- This logo image would be "Graphics/CreditsLogo pro_dude.png".
|
||||
-- }
|
||||
-- StepManiaCredits.AddSection(theme_credits)
|
||||
--
|
||||
-- If you want to add your section after an existing section, use the following:
|
||||
-- StepManiaCredits.AddSection(theme_credits, 7)
|
||||
--
|
||||
-- Or position can be the name of a section to insert after:
|
||||
-- StepManiaCredits.AddSection(theme_credits, "Special Thanks")
|
||||
--
|
||||
-- Or if you want to add your section before a section:
|
||||
-- StepManiaCredits.AddSection(theme_credits, "Special Thanks", true)
|
||||
|
||||
-- StepManiaCredits is defined in _fallback/Scripts/04 CreditsHelpers.lua.
|
||||
|
||||
local line_on = cmd(zoom,0.875;strokecolor,color("#444444");shadowcolor,color("#444444");shadowlength,1)
|
||||
local section_on = cmd(diffuse,color("#88DDFF");strokecolor,color("#446688");shadowcolor,color("#446688");shadowlength,1)
|
||||
local subsection_on = cmd(diffuse,color("#88DDFF");strokecolor,color("#446688");shadowcolor,color("#446688");shadowlength,1)
|
||||
local item_padding_start = 4;
|
||||
local line_height= 30
|
||||
-- Tell the credits table the line height so it can use it for logo sizing.
|
||||
StepManiaCredits.SetLineHeight(line_height)
|
||||
|
||||
local creditScroller = Def.ActorScroller {
|
||||
SecondsPerItem = 0.5;
|
||||
NumItemsToDraw = 40;
|
||||
TransformFunction = function( self, offset, itemIndex, numItems)
|
||||
self:y(line_height*offset)
|
||||
end;
|
||||
OnCommand = cmd(scrollwithpadding,item_padding_start,15);
|
||||
}
|
||||
|
||||
-- Add sections with padding.
|
||||
for section in ivalues(StepManiaCredits.Get()) do
|
||||
StepManiaCredits.AddLineToScroller(creditScroller, section.name, section_on)
|
||||
for name in ivalues(section) do
|
||||
if name.type == "subsection" then
|
||||
StepManiaCredits.AddLineToScroller(creditScroller, name, subsection_on)
|
||||
else
|
||||
StepManiaCredits.AddLineToScroller(creditScroller, name, line_on)
|
||||
end
|
||||
end
|
||||
StepManiaCredits.AddLineToScroller(creditScroller)
|
||||
StepManiaCredits.AddLineToScroller(creditScroller)
|
||||
end
|
||||
|
||||
creditScroller.BeginCommand=function(self)
|
||||
SCREENMAN:GetTopScreen():PostScreenMessage( 'SM_MenuTimer', (creditScroller.SecondsPerItem * (#creditScroller + item_padding_start) + 10) );
|
||||
end;
|
||||
|
||||
return Def.ActorFrame{
|
||||
creditScroller..{
|
||||
InitCommand=cmd(CenterX;y,SCREEN_BOTTOM-64),
|
||||
},
|
||||
LoadActor(THEME:GetPathB("ScreenWithMenuElements","background/_bg top"))..{
|
||||
InitCommand=cmd(Center),
|
||||
},
|
||||
};
|
||||
@@ -1,3 +0,0 @@
|
||||
local t = LoadFallbackB();
|
||||
t[#t+1] = LoadActor( THEME:GetPathB("_Arcade","decorations") );
|
||||
return t
|
||||
@@ -1,6 +0,0 @@
|
||||
return Def.ActorFrame{
|
||||
Def.Quad{
|
||||
InitCommand=cmd(FullScreen;diffuse,color("0,0,0,1");cropbottom,1;fadebottom,1);
|
||||
OnCommand=cmd(decelerate,0.5;cropbottom,0;fadebottom,0);
|
||||
};
|
||||
};
|
||||
@@ -1,46 +0,0 @@
|
||||
local t = Def.ActorFrame{
|
||||
Def.Quad{
|
||||
Name="TopFrame";
|
||||
InitCommand=cmd(CenterX;y,SCREEN_TOP;valign,0;zoomto,SCREEN_WIDTH,SCREEN_HEIGHT*0.15;diffuse,color("0,0,0,1");fadebottom,0.5);
|
||||
};
|
||||
|
||||
Def.Quad{
|
||||
Name="BotFrame";
|
||||
InitCommand=cmd(CenterX;y,SCREEN_BOTTOM;valign,1;zoomto,SCREEN_WIDTH,SCREEN_HEIGHT*0.15;diffuse,color("0,0,0,1");fadetop,0.5);
|
||||
};
|
||||
|
||||
Def.ActorFrame{
|
||||
Name="MiddleSection";
|
||||
InitCommand=cmd(CenterX;y,SCREEN_CENTER_Y*1.35);
|
||||
Def.Quad{
|
||||
Name="Frame";
|
||||
InitCommand=cmd(zoomto,SCREEN_WIDTH,0;diffuse,color("0.1,0.1,0.1,0.75");fadebottom,0.25;fadetop,0.25;);
|
||||
OnCommand=cmd(smooth,0.75;zoomtoheight,64;);
|
||||
};
|
||||
LoadFont("Common normal")..{
|
||||
Text=Screen.String("Demonstration");
|
||||
InitCommand=cmd(diffusealpha,0;strokecolor,color("0,0,0,0.5"));
|
||||
OnCommand=cmd(smooth,0.75;diffusealpha,1;diffuseshift;effectcolor1,HSV(38,0.45,0.95));
|
||||
};
|
||||
};
|
||||
|
||||
LoadFont("Common normal")..{
|
||||
Name="SongTitle";
|
||||
InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_TOP+16;zoom,0.5;shadowlength,1;valign,0);
|
||||
BeginCommand=function(self)
|
||||
local song = GAMESTATE:GetCurrentSong();
|
||||
local text = "";
|
||||
if song then
|
||||
local artist = song:GetDisplayArtist()
|
||||
local title = song:GetDisplayFullTitle()
|
||||
local group = song:GetGroupName()
|
||||
text = string.format(Screen.String("%s - %s [from %s]"),artist,title,group)
|
||||
end;
|
||||
self:settext(text);
|
||||
end;
|
||||
-- OnCommand=cmd(queuecommand,"Scroll");
|
||||
-- ScrollCommand=cmd(linear,10;x,-SCREEN_WIDTH*2;sleep,1;x,SCREEN_WIDTH*2;queuecommand,"Scroll");
|
||||
};
|
||||
};
|
||||
|
||||
return t;
|
||||
@@ -1,27 +0,0 @@
|
||||
local t = Def.ActorFrame {
|
||||
InitCommand=cmd(fov,90);
|
||||
};
|
||||
t[#t+1] = Def.ActorFrame {
|
||||
InitCommand=cmd(Center);
|
||||
LoadActor( THEME:GetPathB("ScreenWithMenuElements","background/_bg top") ) .. {
|
||||
InitCommand=cmd(scaletoclipped,SCREEN_WIDTH,SCREEN_HEIGHT);
|
||||
};
|
||||
Def.Quad{
|
||||
InitCommand=cmd(scaletoclipped,SCREEN_WIDTH,SCREEN_HEIGHT;diffuse,color("0.2,0.2,0.2,0"));
|
||||
OnCommand=function(self)
|
||||
local topScreen = SCREENMAN:GetTopScreen()
|
||||
if topScreen then
|
||||
local screenName = topScreen:GetName()
|
||||
if screenName == "ScreenEdit" or screenName == "ScreenPractice" then
|
||||
self:diffusealpha(0.95)
|
||||
else
|
||||
self:diffusealpha(0.65)
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
EditorShowMessageCommand=cmd(stoptweening;linear,0.5;diffusealpha,0.95);
|
||||
EditorHideMessageCommand=cmd(stoptweening;linear,0.5;diffusealpha,0.65);
|
||||
};
|
||||
};
|
||||
|
||||
return t;
|
||||
@@ -1,27 +0,0 @@
|
||||
local t = Def.ActorFrame {};
|
||||
|
||||
t[#t+1] = Def.ActorFrame {
|
||||
Def.Sprite {
|
||||
OnCommand=function(self)
|
||||
if GAMESTATE:GetCurrentSong() then
|
||||
local song = GAMESTATE:GetCurrentSong();
|
||||
if song:HasBackground() then
|
||||
self:LoadBackground(song:GetBackgroundPath());
|
||||
end;
|
||||
self:scale_or_crop_background()
|
||||
self:fadebottom(0.25)
|
||||
self:fadetop(0.25)
|
||||
self:croptop(1/10)
|
||||
self:cropbottom(1/10)
|
||||
else
|
||||
self:visible(false);
|
||||
end
|
||||
end;
|
||||
};
|
||||
Def.Quad {
|
||||
InitCommand=cmd(Center;scaletoclipped,SCREEN_WIDTH+1,SCREEN_HEIGHT);
|
||||
OnCommand=cmd(diffuse,color("#FFCB05");diffusebottomedge,color("#F0BA00");diffusealpha,0.45);
|
||||
};
|
||||
};
|
||||
|
||||
return t
|
||||
@@ -1,259 +0,0 @@
|
||||
local function GraphDisplay( pn )
|
||||
local t = Def.ActorFrame {
|
||||
LoadActor( THEME:GetPathG("_GraphDisplay","overlay")) .. {
|
||||
InitCommand=cmd(y,6);
|
||||
};
|
||||
Def.GraphDisplay {
|
||||
InitCommand=cmd(Load,"GraphDisplay";);
|
||||
BeginCommand=function(self)
|
||||
local ss = SCREENMAN:GetTopScreen():GetStageStats();
|
||||
self:Set( ss, ss:GetPlayerStageStats(pn) );
|
||||
self:player( pn );
|
||||
end
|
||||
};
|
||||
};
|
||||
return t;
|
||||
end
|
||||
|
||||
local function ComboGraph( pn )
|
||||
local t = Def.ActorFrame {
|
||||
Def.ComboGraph {
|
||||
InitCommand=cmd(Load,"ComboGraph";);
|
||||
BeginCommand=function(self)
|
||||
local ss = SCREENMAN:GetTopScreen():GetStageStats();
|
||||
self:Set( ss, ss:GetPlayerStageStats(pn) );
|
||||
self:player( pn );
|
||||
end
|
||||
};
|
||||
};
|
||||
return t;
|
||||
end
|
||||
|
||||
local function PercentScore( pn )
|
||||
local t = LoadFont("Common normal")..{
|
||||
InitCommand=cmd(zoom,0.625;shadowlength,1;player,pn);
|
||||
BeginCommand=cmd(playcommand,"Set");
|
||||
SetCommand=function(self)
|
||||
-- todo: color by difficulty
|
||||
local SongOrCourse, StepsOrTrail;
|
||||
if GAMESTATE:IsCourseMode() then
|
||||
SongOrCourse = GAMESTATE:GetCurrentCourse()
|
||||
StepsOrTrail = GAMESTATE:GetCurrentTrail(pn)
|
||||
else
|
||||
SongOrCourse = GAMESTATE:GetCurrentSong()
|
||||
StepsOrTrail = GAMESTATE:GetCurrentSteps(pn)
|
||||
end;
|
||||
if SongOrCourse and StepsOrTrail then
|
||||
local st = StepsOrTrail:GetStepsType();
|
||||
local diff = StepsOrTrail:GetDifficulty();
|
||||
local courseType = GAMESTATE:IsCourseMode() and SongOrCourse:GetCourseType() or nil;
|
||||
local cd = GetCustomDifficulty(st, diff, courseType);
|
||||
self:diffuse(CustomDifficultyToColor(cd));
|
||||
self:shadowcolor(CustomDifficultyToDarkColor(cd));
|
||||
end
|
||||
|
||||
local pss = STATSMAN:GetPlayedStageStats(1):GetPlayerStageStats(pn);
|
||||
if pss then
|
||||
local pct = pss:GetPercentDancePoints();
|
||||
if pct == 1 then
|
||||
self:settext("100%");
|
||||
else
|
||||
self:settext(FormatPercentScore(pct));
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
};
|
||||
return t;
|
||||
end
|
||||
|
||||
local t = LoadFallbackB();
|
||||
|
||||
t[#t+1] = StandardDecorationFromFileOptional("StageDisplay","StageDisplay");
|
||||
|
||||
if ShowStandardDecoration("GraphDisplay") and GAMESTATE:GetPlayMode() ~= "PlayMode_Rave" then
|
||||
for pn in ivalues(GAMESTATE:GetHumanPlayers()) do
|
||||
t[#t+1] = StandardDecorationFromTable( "GraphDisplay" .. ToEnumShortString(pn), GraphDisplay(pn) );
|
||||
end
|
||||
end
|
||||
|
||||
if ShowStandardDecoration("ComboGraph") and GAMESTATE:GetPlayMode() ~= "PlayMode_Rave" then
|
||||
for pn in ivalues(GAMESTATE:GetHumanPlayers()) do
|
||||
t[#t+1] = StandardDecorationFromTable( "ComboGraph" .. ToEnumShortString(pn), ComboGraph(pn) );
|
||||
end
|
||||
end
|
||||
|
||||
if ShowStandardDecoration("StepsDisplay") then
|
||||
for pn in ivalues(PlayerNumber) do
|
||||
local t2 = Def.StepsDisplay {
|
||||
InitCommand=cmd(Load,"StepsDisplayEvaluation",pn;SetFromGameState,pn;);
|
||||
UpdateNetEvalStatsMessageCommand=function(self,param)
|
||||
if GAMESTATE:IsPlayerEnabled(pn) then
|
||||
self:SetFromSteps(param.Steps)
|
||||
end;
|
||||
end;
|
||||
};
|
||||
t[#t+1] = StandardDecorationFromTable( "StepsDisplay" .. ToEnumShortString(pn), t2 );
|
||||
t[#t+1] = StandardDecorationFromTable( "PercentScore" .. ToEnumShortString(pn), PercentScore(pn) );
|
||||
end
|
||||
end
|
||||
|
||||
for pn in ivalues(PlayerNumber) do
|
||||
local MetricsName = "MachineRecord" .. PlayerNumberToString(pn);
|
||||
t[#t+1] = LoadActor( THEME:GetPathG(Var "LoadingScreen", "MachineRecord"), pn ) .. {
|
||||
InitCommand=function(self)
|
||||
self:player(pn);
|
||||
self:name(MetricsName);
|
||||
ActorUtil.LoadAllCommandsAndSetXY(self,Var "LoadingScreen");
|
||||
end;
|
||||
};
|
||||
end
|
||||
|
||||
for pn in ivalues(PlayerNumber) do
|
||||
local MetricsName = "PersonalRecord" .. PlayerNumberToString(pn);
|
||||
t[#t+1] = LoadActor( THEME:GetPathG(Var "LoadingScreen", "PersonalRecord"), pn ) .. {
|
||||
InitCommand=function(self)
|
||||
self:player(pn);
|
||||
self:name(MetricsName);
|
||||
ActorUtil.LoadAllCommandsAndSetXY(self,Var "LoadingScreen");
|
||||
end;
|
||||
};
|
||||
end
|
||||
|
||||
for pn in ivalues(PlayerNumber) do
|
||||
local MetricsName = "StageAward" .. PlayerNumberToString(pn);
|
||||
t[#t+1] = LoadActor( THEME:GetPathG(Var "LoadingScreen", "StageAward"), pn ) .. {
|
||||
InitCommand=function(self)
|
||||
self:player(pn);
|
||||
self:name(MetricsName);
|
||||
ActorUtil.LoadAllCommandsAndSetXY(self,Var "LoadingScreen");
|
||||
end;
|
||||
BeginCommand=cmd(playcommand,"Set");
|
||||
SetCommand=function(self)
|
||||
local tStats = THEME:GetMetric(Var "LoadingScreen", "Summary") and STATSMAN:GetAccumPlayedStageStats() or STATSMAN:GetCurStageStats();
|
||||
tStats = tStats:GetPlayerStageStats(pn);
|
||||
if tStats:GetStageAward() and not tStats:GetFailed() then
|
||||
self:settext( THEME:GetString( "StageAward", ToEnumShortString( tStats:GetStageAward() ) ) );
|
||||
else
|
||||
self:settext( "" );
|
||||
end
|
||||
end;
|
||||
};
|
||||
end
|
||||
|
||||
for pn in ivalues(PlayerNumber) do
|
||||
local MetricsName = "PeakComboAward" .. PlayerNumberToString(pn);
|
||||
t[#t+1] = LoadActor( THEME:GetPathG(Var "LoadingScreen", "PeakComboAward"), pn ) .. {
|
||||
InitCommand=function(self)
|
||||
self:player(pn);
|
||||
self:name(MetricsName);
|
||||
ActorUtil.LoadAllCommandsAndSetXY(self,Var "LoadingScreen");
|
||||
end;
|
||||
BeginCommand=cmd(playcommand,"Set");
|
||||
SetCommand=function(self)
|
||||
local tStats = THEME:GetMetric(Var "LoadingScreen", "Summary") and STATSMAN:GetAccumPlayedStageStats() or STATSMAN:GetCurStageStats();
|
||||
tStats = tStats:GetPlayerStageStats(pn);
|
||||
if tStats:GetPeakComboAward() then
|
||||
self:settext( THEME:GetString( "PeakComboAward", ToEnumShortString( tStats:GetPeakComboAward() ) ) );
|
||||
else
|
||||
self:settext( "" );
|
||||
end
|
||||
end;
|
||||
};
|
||||
end
|
||||
|
||||
t[#t+1] = StandardDecorationFromFileOptional("SongInformation","SongInformation") .. {
|
||||
BeginCommand=function(self)
|
||||
local SongOrCourse;
|
||||
if GAMESTATE:GetCurrentSong() then
|
||||
SongOrCourse = GAMESTATE:GetCurrentSong();
|
||||
elseif GAMESTATE:GetCurrentCourse() then
|
||||
SongOrCourse = GAMESTATE:GetCurrentCourse();
|
||||
else
|
||||
return
|
||||
end
|
||||
|
||||
if SongOrCourse:HasBanner() then
|
||||
self:visible(false);
|
||||
else
|
||||
self:visible(true);
|
||||
end
|
||||
end;
|
||||
SetCommand=function(self)
|
||||
local c = self:GetChildren();
|
||||
local SongOrCourse;
|
||||
if GAMESTATE:GetCurrentSong() then
|
||||
SongOrCourse = GAMESTATE:GetCurrentSong();
|
||||
|
||||
c.TextTitle:settext( SongOrCourse:GetDisplayMainTitle() or nil );
|
||||
c.TextSubtitle:settext( SongOrCourse:GetDisplaySubTitle() or nil );
|
||||
c.TextArtist:settext( SongOrCourse:GetDisplayArtist() or nil );
|
||||
|
||||
if SongOrCourse:GetDisplaySubTitle() == "" then
|
||||
c.TextTitle:visible(true);
|
||||
c.TextTitle:y(-16.5/2);
|
||||
c.TextSubtitle:visible(false);
|
||||
c.TextSubtitle:y(0);
|
||||
c.TextArtist:visible(true);
|
||||
c.TextArtist:y(18/2);
|
||||
else
|
||||
c.TextTitle:visible(true);
|
||||
c.TextTitle:y(-16.5);
|
||||
c.TextSubtitle:visible(true);
|
||||
c.TextSubtitle:y(0);
|
||||
c.TextArtist:visible(true);
|
||||
c.TextArtist:y(18);
|
||||
end
|
||||
-- self:playcommand("Tick");
|
||||
elseif GAMESTATE:GetCurrentCourse() then
|
||||
SongOrCourse = GAMESTATE:GetCurrentCourse();
|
||||
|
||||
c.TextTitle:settext( SongOrCourse:GetDisplayMainTitle() or nil );
|
||||
c.TextSubtitle:settext( SongOrCourse:GetDisplaySubTitle() or nil );
|
||||
c.TextArtist:settext( SongOrCourse:GetDisplayArtist() or nil );
|
||||
|
||||
-- self:playcommand("Tick");
|
||||
else
|
||||
SongOrCourse = nil;
|
||||
|
||||
c.TextTitle:settext("");
|
||||
c.TextSubtitle:settext("");
|
||||
c.TextArtist:settext("");
|
||||
|
||||
self:playcommand("Hide")
|
||||
end
|
||||
end;
|
||||
-- OnCommand=cmd(playcommand,"Set");
|
||||
CurrentSongChangedMessageCommand=cmd(playcommand,"Set");
|
||||
CurrentCourseChangedMessageCommand=cmd(playcommand,"Set");
|
||||
DisplayLanguageChangedMessageCommand=cmd(playcommand,"Set");
|
||||
};
|
||||
t[#t+1] = StandardDecorationFromFileOptional("LifeDifficulty","LifeDifficulty");
|
||||
t[#t+1] = StandardDecorationFromFileOptional("TimingDifficulty","TimingDifficulty");
|
||||
t[#t+1] = StandardDecorationFromFileOptional("GameType","GameType");
|
||||
t[#t+1] = Def.ActorFrame {
|
||||
Condition=GAMESTATE:HasEarnedExtraStage() and GAMESTATE:IsExtraStage() and not GAMESTATE:IsExtraStage2();
|
||||
InitCommand=cmd(draworder,105);
|
||||
LoadActor( THEME:GetPathS("ScreenEvaluation","try Extra1" ) ) .. {
|
||||
Condition=THEME:GetMetric( Var "LoadingScreen","Summary" ) == false;
|
||||
OnCommand=cmd(play);
|
||||
};
|
||||
LoadActor( THEME:GetPathG("ScreenStageInformation","Stage extra1" ) ) .. {
|
||||
Condition=THEME:GetMetric( Var "LoadingScreen","Summary" ) == false;
|
||||
InitCommand=cmd(Center);
|
||||
OnCommand=cmd(diffusealpha,0;zoom,0.85;bounceend,1;zoom,1;diffusealpha,1;sleep,0;glow,Color("White");decelerate,1;glow,Color("Invisible");smooth,0.35;zoom,0.25;y,SCREEN_BOTTOM-72);
|
||||
};
|
||||
};
|
||||
t[#t+1] = Def.ActorFrame {
|
||||
Condition=GAMESTATE:HasEarnedExtraStage() and not GAMESTATE:IsExtraStage() and GAMESTATE:IsExtraStage2();
|
||||
InitCommand=cmd(draworder,105);
|
||||
LoadActor( THEME:GetPathS("ScreenEvaluation","try Extra2" ) ) .. {
|
||||
Condition=THEME:GetMetric( Var "LoadingScreen","Summary" ) == false;
|
||||
OnCommand=cmd(play);
|
||||
};
|
||||
LoadActor( THEME:GetPathG("ScreenStageInformation","Stage extra2" ) ) .. {
|
||||
Condition=THEME:GetMetric( Var "LoadingScreen","Summary" ) == false;
|
||||
InitCommand=cmd(Center);
|
||||
OnCommand=cmd(diffusealpha,0;zoom,0.85;bounceend,1;zoom,1;diffusealpha,1;sleep,0;glow,Color("White");decelerate,1;glow,Color("Invisible");smooth,0.35;zoom,0.25;y,SCREEN_BOTTOM-72);
|
||||
};
|
||||
};
|
||||
return t
|
||||
@@ -1,79 +0,0 @@
|
||||
local vStats = STATSMAN:GetCurStageStats();
|
||||
|
||||
local function CreateStats( pnPlayer )
|
||||
-- Actor Templates
|
||||
local aLabel = LoadFont("Common Normal") .. { InitCommand=cmd(zoom,0.5;shadowlength,1;horizalign,left); };
|
||||
local aText = LoadFont("Common Normal") .. { InitCommand=cmd(zoom,0.5;shadowlength,1;horizalign,left); };
|
||||
-- DA STATS, JIM!!
|
||||
local pnStageStats = vStats:GetPlayerStageStats( pnPlayer );
|
||||
-- Organized Stats.
|
||||
local tStats = {
|
||||
W1 = pnStageStats:GetTapNoteScores('TapNoteScore_W1');
|
||||
W2 = pnStageStats:GetTapNoteScores('TapNoteScore_W2');
|
||||
W3 = pnStageStats:GetTapNoteScores('TapNoteScore_W3');
|
||||
W4 = pnStageStats:GetTapNoteScores('TapNoteScore_W4');
|
||||
W5 = pnStageStats:GetTapNoteScores('TapNoteScore_W5');
|
||||
Miss = pnStageStats:GetTapNoteScores('TapNoteScore_Miss');
|
||||
HitMine = pnStageStats:GetTapNoteScores('TapNoteScore_HitMine');
|
||||
AvoidMine = pnStageStats:GetTapNoteScores('TapNoteScore_AvoidMine');
|
||||
Held = pnStageStats:GetHoldNoteScores('HoldNoteScore_Held');
|
||||
LetGo = pnStageStats:GetHoldNoteScores('HoldNoteScore_LetGo');
|
||||
};
|
||||
-- Organized Equation Values
|
||||
local tValues = {
|
||||
-- marvcount*7 + perfcount*6 + greatcount*5 + goodcount*4 + boocount*2 + okcount*7
|
||||
ITG = ( tStats["W1"]*7 + tStats["W2"]*6 + tStats["W3"]*5 + tStats["W4"]*4 + tStats["W5"]*2 + tStats["Held"]*7 ),
|
||||
-- (marvcount + perfcount + greatcount + goodcount + boocount + misscount + okcount + ngcount)*7
|
||||
ITG_MAX = ( tStats["W1"] + tStats["W2"] + tStats["W3"] + tStats["W4"] + tStats["W5"] + tStats["Miss"] + tStats["Held"] + tStats["LetGo"] )*7,
|
||||
-- marvcount*3 + perfcount*2 + greatcount*1 - boocount*4 - misscount*8 + okcount*6
|
||||
MIGS = ( tStats["W1"]*3 + tStats["W2"]*2 + tStats["W3"] - tStats["W5"]*4 - tStats["Miss"]*8 + tStats["Held"]*6 ),
|
||||
-- (marvcount + perfcount + greatcount + goodcount + boocount + misscount)*3 + (okcount + ngcount)*6
|
||||
MIGS_MAX = ( (tStats["W1"] + tStats["W2"] + tStats["W3"] + tStats["W4"] + tStats["W5"] + tStats["Miss"])*3 + (tStats["Held"] + tStats["LetGo"])*6 ),
|
||||
};
|
||||
|
||||
local t = Def.ActorFrame {};
|
||||
t[#t+1] = Def.ActorFrame {
|
||||
InitCommand=cmd(y,-34);
|
||||
LoadActor(THEME:GetPathG("ScreenTitleMenu","PreferenceFrame")) .. {
|
||||
InitCommand=cmd(zoom,0.875;diffuse,PlayerColor( pnPlayer ));
|
||||
};
|
||||
aLabel .. { Text=THEME:GetString("ScreenEvaluation","ITG DP:"); InitCommand=cmd(x,-64) };
|
||||
aText .. { Text=string.format("%04i",tValues["ITG"]); InitCommand=cmd(x,-8;y,5;vertalign,bottom;zoom,0.6); };
|
||||
aText .. { Text="/"; InitCommand=cmd(x,28;y,5;vertalign,bottom;zoom,0.5;diffusealpha,0.5); };
|
||||
aText .. { Text=string.format("%04i",tValues["ITG_MAX"]); InitCommand=cmd(x,32;y,5;vertalign,bottom;zoom,0.5); };
|
||||
};
|
||||
t[#t+1] = Def.ActorFrame {
|
||||
InitCommand=cmd(y,-6);
|
||||
LoadActor(THEME:GetPathG("ScreenTitleMenu","PreferenceFrame")) .. {
|
||||
InitCommand=cmd(zoom,0.875;diffuse,PlayerColor( pnPlayer ));
|
||||
};
|
||||
aLabel .. { Text=THEME:GetString("ScreenEvaluation","MIGS DP:"); InitCommand=cmd(x,-64) };
|
||||
aText .. { Text=string.format("%04i",tValues["MIGS"]); InitCommand=cmd(x,-8;y,5;vertalign,bottom;zoom,0.6); };
|
||||
aText .. { Text="/"; InitCommand=cmd(x,28;y,5;vertalign,bottom;zoom,0.5;diffusealpha,0.5); };
|
||||
aText .. { Text=string.format("%04i",tValues["MIGS_MAX"]); InitCommand=cmd(x,32;y,5;vertalign,bottom;zoom,0.5); };
|
||||
};
|
||||
return t
|
||||
end;
|
||||
|
||||
local t = Def.ActorFrame {};
|
||||
GAMESTATE:IsPlayerEnabled(PLAYER_1)
|
||||
t[#t+1] = Def.ActorFrame {
|
||||
InitCommand=cmd(hide_if,not GAMESTATE:IsPlayerEnabled(PLAYER_1);x,WideScale(math.floor(SCREEN_CENTER_X*0.3)-8,math.floor(SCREEN_CENTER_X*0.5)-8);y,SCREEN_CENTER_Y-20);
|
||||
CreateStats( PLAYER_1 );
|
||||
};
|
||||
t[#t+1] = Def.ActorFrame {
|
||||
InitCommand=cmd(hide_if,not GAMESTATE:IsPlayerEnabled(PLAYER_2);x,WideScale(math.floor(SCREEN_CENTER_X*1.7)+8,math.floor(SCREEN_CENTER_X*1.5)+8);y,SCREEN_CENTER_Y-20);
|
||||
CreateStats( PLAYER_2 );
|
||||
};
|
||||
|
||||
if gameplay_pause_count > 0 then
|
||||
t[#t+1]= Def.BitmapText{
|
||||
Font= "Common Normal",
|
||||
Text= THEME:GetString("PauseMenu", "pause_count") .. ": " .. gameplay_pause_count,
|
||||
InitCommand= function(self)
|
||||
self:xy(_screen.cx, 375):diffuse(Color.White):zoom(.75)
|
||||
end
|
||||
}
|
||||
end
|
||||
|
||||
return t
|
||||
@@ -1,100 +0,0 @@
|
||||
local vStats = STATSMAN:GetCurStageStats();
|
||||
|
||||
local function CreateStats( pnPlayer )
|
||||
-- Actor Templates
|
||||
local aLabel = LoadFont("Common Normal") .. { InitCommand=cmd(zoom,0.5;shadowlength,1;horizalign,left); };
|
||||
local aText = LoadFont("Common Normal") .. { InitCommand=cmd(zoom,0.5;shadowlength,1;horizalign,left); };
|
||||
-- DA STATS, JIM!!
|
||||
local pnStageStats = vStats:GetPlayerStageStats( pnPlayer );
|
||||
-- Organized Stats.
|
||||
local tStats = {
|
||||
W1 = pnStageStats:GetTapNoteScores('TapNoteScore_W1');
|
||||
W2 = pnStageStats:GetTapNoteScores('TapNoteScore_W2');
|
||||
W3 = pnStageStats:GetTapNoteScores('TapNoteScore_W3');
|
||||
W4 = pnStageStats:GetTapNoteScores('TapNoteScore_W4');
|
||||
W5 = pnStageStats:GetTapNoteScores('TapNoteScore_W5');
|
||||
Miss = pnStageStats:GetTapNoteScores('TapNoteScore_Miss');
|
||||
HitMine = pnStageStats:GetTapNoteScores('TapNoteScore_HitMine');
|
||||
AvoidMine = pnStageStats:GetTapNoteScores('TapNoteScore_AvoidMine');
|
||||
Held = pnStageStats:GetHoldNoteScores('HoldNoteScore_Held');
|
||||
LetGo = pnStageStats:GetHoldNoteScores('HoldNoteScore_LetGo');
|
||||
};
|
||||
local itg_values= {W1= 5,
|
||||
W2= 4,
|
||||
W3= 2,
|
||||
W4= 0,
|
||||
W5= -6,
|
||||
Miss= -12,
|
||||
HitMine= 0, -- Kyz hates mines. Should be -6
|
||||
AvoidMine= 0,
|
||||
Held= 5,
|
||||
LetGo= 0}
|
||||
local migs_values= {W1= 3,
|
||||
W2= 2,
|
||||
W3= 1,
|
||||
W4= 0,
|
||||
W5= -4,
|
||||
Miss= -8,
|
||||
HitMine= 0,
|
||||
AvoidMine= 0,
|
||||
Held= 6,
|
||||
LetGo= 0}
|
||||
local itg_keys_for_max= {W1= 5, W2= 5, W3= 5, W4= 5, W5= 5, Miss= 5, Held= 5, LetGo= 5}
|
||||
local migs_keys_for_max= {W1= 3, W2= 3, W3= 3, W4= 3, W3= 3, Miss= 3, Held= 6, LetGo= 6}
|
||||
|
||||
local tValues= { ITG= 0, ITG_MAX= 0, MIGS= 0, MIGS_MAX= 0}
|
||||
for k, v in pairs(itg_keys_for_max) do
|
||||
if tStats[k] then
|
||||
tValues.ITG_MAX= tValues.ITG_MAX + (tStats[k] * v)
|
||||
end
|
||||
end
|
||||
for k, v in pairs(migs_keys_for_max) do
|
||||
if tStats[k] then
|
||||
tValues.MIGS_MAX= tValues.MIGS_MAX + (tStats[k] * v)
|
||||
end
|
||||
end
|
||||
|
||||
for k, v in pairs(tStats) do
|
||||
if itg_values[k] then
|
||||
tValues.ITG= tValues.ITG + (v * itg_values[k])
|
||||
end
|
||||
if migs_values[k] then
|
||||
tValues.MIGS= tValues.MIGS + (v * migs_values[k])
|
||||
end
|
||||
end
|
||||
|
||||
local t = Def.ActorFrame {};
|
||||
t[#t+1] = Def.ActorFrame {
|
||||
InitCommand=cmd(y,-34);
|
||||
LoadActor(THEME:GetPathG("ScreenTitleMenu","PreferenceFrame")) .. {
|
||||
InitCommand=cmd(zoom,0.875;diffuse,PlayerColor( pnPlayer ));
|
||||
};
|
||||
aLabel .. { Text=THEME:GetString("ScreenEvaluation","ITG DP:"); InitCommand=cmd(x,-64) };
|
||||
aText .. { Text=string.format("%04i",tValues["ITG"]); InitCommand=cmd(x,-8;y,5;vertalign,bottom;zoom,0.6); };
|
||||
aText .. { Text="/"; InitCommand=cmd(x,28;y,5;vertalign,bottom;zoom,0.5;diffusealpha,0.5); };
|
||||
aText .. { Text=string.format("%04i",tValues["ITG_MAX"]); InitCommand=cmd(x,32;y,5;vertalign,bottom;zoom,0.5); };
|
||||
};
|
||||
t[#t+1] = Def.ActorFrame {
|
||||
InitCommand=cmd(y,-6);
|
||||
LoadActor(THEME:GetPathG("ScreenTitleMenu","PreferenceFrame")) .. {
|
||||
InitCommand=cmd(zoom,0.875;diffuse,PlayerColor( pnPlayer ));
|
||||
};
|
||||
aLabel .. { Text=THEME:GetString("ScreenEvaluation","MIGS DP:"); InitCommand=cmd(x,-64) };
|
||||
aText .. { Text=string.format("%04i",tValues["MIGS"]); InitCommand=cmd(x,-8;y,5;vertalign,bottom;zoom,0.6); };
|
||||
aText .. { Text="/"; InitCommand=cmd(x,28;y,5;vertalign,bottom;zoom,0.5;diffusealpha,0.5); };
|
||||
aText .. { Text=string.format("%04i",tValues["MIGS_MAX"]); InitCommand=cmd(x,32;y,5;vertalign,bottom;zoom,0.5); };
|
||||
};
|
||||
return t
|
||||
end;
|
||||
|
||||
local t = Def.ActorFrame {};
|
||||
GAMESTATE:IsPlayerEnabled(PLAYER_1)
|
||||
t[#t+1] = Def.ActorFrame {
|
||||
InitCommand=cmd(hide_if,not GAMESTATE:IsPlayerEnabled(PLAYER_1);x,WideScale(math.floor(SCREEN_CENTER_X*0.3)-8,math.floor(SCREEN_CENTER_X*0.5)-8);y,SCREEN_CENTER_Y-34);
|
||||
CreateStats( PLAYER_1 );
|
||||
};
|
||||
t[#t+1] = Def.ActorFrame {
|
||||
InitCommand=cmd(hide_if,not GAMESTATE:IsPlayerEnabled(PLAYER_2);x,WideScale(math.floor(SCREEN_CENTER_X*1.7)+8,math.floor(SCREEN_CENTER_X*1.5)+8);y,SCREEN_CENTER_Y-34);
|
||||
CreateStats( PLAYER_2 );
|
||||
};
|
||||
return t
|
||||
@@ -1,86 +0,0 @@
|
||||
local ss = STATSMAN:GetCurStageStats();
|
||||
local pss = ss:GetPlayerStageStats('PlayerNumber_P1');
|
||||
local misscount = pss:GetTapNoteScores('TapNoteScore_Miss');
|
||||
local boocount = pss:GetTapNoteScores('TapNoteScore_W5');
|
||||
local goodcount = pss:GetTapNoteScores('TapNoteScore_W4');
|
||||
local greatcount = pss:GetTapNoteScores('TapNoteScore_W3');
|
||||
local perfcount = pss:GetTapNoteScores('TapNoteScore_W2');
|
||||
local marvcount = pss:GetTapNoteScores('TapNoteScore_W1');
|
||||
local minehitcount = pss:GetTapNoteScores('TapNoteScore_HitMine');
|
||||
local minemisscount = pss:GetTapNoteScores('TapNoteScore_AvoidMine');
|
||||
local okcount = pss:GetHoldNoteScores('HoldNoteScore_Held');
|
||||
local ngcount = pss:GetHoldNoteScores('HoldNoteScore_LetGo');
|
||||
local ITGdp = marvcount*7 + perfcount*6 + greatcount*5 + goodcount*4 + boocount*2 + okcount*7
|
||||
local ITGdpmax = (marvcount + perfcount + greatcount + goodcount + boocount + misscount + okcount + ngcount)*7
|
||||
local MIGSdp = marvcount*3 + perfcount*2 + greatcount*1 - boocount*4 - misscount*8 + okcount*6
|
||||
local MIGSdpmax = (marvcount + perfcount + greatcount + goodcount + boocount + misscount)*3 + (okcount + ngcount)*6
|
||||
local histogram = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
|
||||
local total = 0
|
||||
local maxValue = 0;
|
||||
print("John11length: "..#histogram);
|
||||
|
||||
for i=1,#tTotalJudgmentsSigned do
|
||||
print("John11Timings: "..i.." - "..tTotalJudgmentsSigned[i])
|
||||
local index = math.floor((0.18-tTotalJudgmentsSigned[i])*(#histogram/.36));
|
||||
print("John11Index: "..i.." - "..index)
|
||||
if index >= 0 and index <= #histogram - 1 then
|
||||
histogram[index] = histogram[index] + 1
|
||||
total = total + 1
|
||||
if histogram[index] > maxValue then
|
||||
maxValue = histogram[index]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
for i=1,#histogram do
|
||||
print("John11Judgments: "..i.." - "..histogram[i])
|
||||
end
|
||||
|
||||
local t = Def.ActorFrame {}
|
||||
t[#t+1] = Def.ActorFrame {
|
||||
InitCommand=cmd(x,SCREEN_CENTER_X/3;y,SCREEN_CENTER_Y);
|
||||
LoadFont("Common Normal") .. {
|
||||
Text="MIGS DP: "..tostring(MIGSdp).."/"..tostring(MIGSdpmax).."\nITG DP: "..tostring(ITGdp).."/"..tostring(ITGdpmax).."\nOffset Avg: "..RoundTo(tTimingDifferenceAverage,5).."\nAbs Offset Avg: "..RoundTo(tTimingDifferenceAbsAverage,5).."\nEarly Taps: "..tEarlyHits.."\nLate Taps: "..tLateHits;
|
||||
InitCommand=cmd(y,-4;shadowlength,1;diffuse,Color("Red");zoom,0.5)
|
||||
};
|
||||
}
|
||||
|
||||
for i=1,#histogram do
|
||||
local offset = -1
|
||||
if i > #histogram/2 then
|
||||
offset = 1
|
||||
end
|
||||
t[#t+1] = Def.Quad {
|
||||
InitCommand=cmd(diffuse,Color("Red");zoomtowidth,300/#histogram-1;zoomtoheight,histogram[#histogram-i]/maxValue*150;x,SCREEN_CENTER_X+100+300/#histogram*i+offset;y,SCREEN_CENTER_Y-histogram[#histogram-i]/maxValue*150/2);
|
||||
}
|
||||
end
|
||||
|
||||
t[#t+1] = Def.Quad {
|
||||
InitCommand=cmd(x,SCREEN_CENTER_X+250;y,SCREEN_CENTER_Y+3;zoomtowidth,300;zoomtoheight,5;diffuse,color("#FFFFFF"));
|
||||
}
|
||||
|
||||
t[#t+1] = Def.Quad {
|
||||
InitCommand=cmd(x,SCREEN_CENTER_X+252;y,SCREEN_CENTER_Y-75;zoomtowidth,1;zoomtoheight,150;diffuse,color("#000000"));
|
||||
}
|
||||
|
||||
|
||||
t[#t+1] = Def.ActorFrame {
|
||||
InitCommand=cmd(x,SCREEN_CENTER_X+125;y,SCREEN_CENTER_Y+15);
|
||||
LoadFont("Common Normal") .. {
|
||||
Text="Early";
|
||||
InitCommand=cmd(shadowlength,1;diffuse,Color("#FF0000");zoom,0.5)
|
||||
};
|
||||
}
|
||||
|
||||
t[#t+1] = Def.ActorFrame {
|
||||
InitCommand=cmd(x,SCREEN_CENTER_X+375;y,SCREEN_CENTER_Y+15);
|
||||
LoadFont("Common Normal") .. {
|
||||
Text="Late";
|
||||
InitCommand=cmd(shadowlength,1;diffuse,Color("#FF0000");zoom,0.5)
|
||||
};
|
||||
}
|
||||
|
||||
print("John11Total: "..total)
|
||||
print("John11MaxValue: "..maxValue)
|
||||
|
||||
return t
|
||||
@@ -1,3 +0,0 @@
|
||||
local t = LoadActor(THEME:GetPathB("ScreenWithMenuElements","background"));
|
||||
|
||||
return t;
|
||||
@@ -1,5 +0,0 @@
|
||||
local t = LoadFallbackB();
|
||||
|
||||
t[#t+1] = StandardDecorationFromFileOptional("BannerList","BannerList");
|
||||
|
||||
return t;
|
||||
@@ -1,10 +0,0 @@
|
||||
local t = Def.ActorFrame {};
|
||||
--[[ t[#t+1] = Def.Actor {
|
||||
OnCommand=function(self)
|
||||
local sTarget = PROFILEMAN:GetProfileDir('ProfileSlot_Machine');
|
||||
--
|
||||
WriteFile(sTarget .. "Jason.txt","Charlie is a magical unicorn!");
|
||||
end;
|
||||
}; --]]
|
||||
|
||||
return t
|
||||
@@ -1,29 +0,0 @@
|
||||
local timer_seconds = THEME:GetMetric(Var "LoadingScreen","TimerSeconds");
|
||||
|
||||
return Def.ActorFrame {
|
||||
InitCommand=cmd(Center),
|
||||
-- Fade
|
||||
Def.ActorFrame {
|
||||
InitCommand=cmd();
|
||||
Def.Quad {
|
||||
InitCommand=cmd(scaletoclipped,SCREEN_WIDTH,SCREEN_HEIGHT),
|
||||
OnCommand=cmd(diffuse,Color.Black;diffusealpha,0;linear,0.5;diffusealpha,0.25;
|
||||
sleep,timer_seconds/2;
|
||||
linear,timer_seconds/2-0.5;diffusealpha,0.8),
|
||||
},
|
||||
-- Warning Fade
|
||||
Def.Quad {
|
||||
InitCommand=cmd(y,-4;scaletoclipped,SCREEN_WIDTH,164),
|
||||
OnCommand=cmd(diffuse,Color.Black;diffusealpha,0.5;
|
||||
linear,timer_seconds;zoomtoheight,164*0.75),
|
||||
}
|
||||
},
|
||||
--
|
||||
LoadActor(THEME:GetPathG("ScreenGameOver","gameover"))..{
|
||||
InitCommand=cmd(y,-16;shadowlength,2)
|
||||
},
|
||||
LoadFont("Common Normal")..{
|
||||
Text=ScreenString("Play again soon!"),
|
||||
InitCommand=cmd(y,36;shadowlength,2)
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
return Def.ActorFrame { Name="YOU_WISH_YOU_WERE_PLAYING_BEATMANIA_RIGHT_NOW" };
|
||||
@@ -1,6 +0,0 @@
|
||||
return Def.ActorFrame {
|
||||
Def.Quad{
|
||||
InitCommand=cmd(FullScreen;diffuse,color("1,0,0,0");blend,Blend.Multiply);
|
||||
OnCommand=cmd(smooth,1;diffuse,color("0.75,0,0,0.75");decelerate,2;diffuse,color("0,0,0,1"));
|
||||
};
|
||||
};
|
||||
@@ -1 +0,0 @@
|
||||
[BGAnimation]
|
||||
@@ -1 +0,0 @@
|
||||
[BGAnimation]
|
||||
@@ -1 +0,0 @@
|
||||
[BGAnimation]
|
||||
@@ -1 +0,0 @@
|
||||
[BGAnimation]
|
||||
@@ -1,231 +0,0 @@
|
||||
local maxSegments = 150
|
||||
|
||||
local function CreateSegments(Player)
|
||||
local t = Def.ActorFrame { };
|
||||
local bars = Def.ActorFrame{ Name="CoverBars" };
|
||||
local bpmFrame = Def.ActorFrame{ Name="BPMFrame"; };
|
||||
local stopFrame = Def.ActorFrame{ Name="StopFrame"; };
|
||||
local delayFrame = Def.ActorFrame{ Name="DelayFrame"; };
|
||||
local warpFrame = Def.ActorFrame{ Name="WarpFrame"; };
|
||||
local fakeFrame = Def.ActorFrame{ Name="FakeFrame"; };
|
||||
local scrollFrame = Def.ActorFrame{ Name="ScrollFrame"; };
|
||||
local speedFrame = Def.ActorFrame{ Name="SpeedFrame"; };
|
||||
|
||||
local fFrameWidth = 380;
|
||||
local fFrameHeight = 8;
|
||||
-- XXX: doesn't work in course mode -aj
|
||||
if not GAMESTATE:IsSideJoined( Player ) then
|
||||
return t
|
||||
elseif not GAMESTATE:IsCourseMode() then
|
||||
-- Straight rip off NCRX
|
||||
local song = GAMESTATE:GetCurrentSong();
|
||||
local steps = GAMESTATE:GetCurrentSteps( Player );
|
||||
if steps then
|
||||
local timingData = steps:GetTimingData();
|
||||
-- use the StepsSeconds, which will almost always be more proper
|
||||
-- than a file with ITG2r21 compatibility.
|
||||
if song then
|
||||
local songLen = song:MusicLengthSeconds();
|
||||
|
||||
local firstBeatSecs = song:GetFirstSecond();
|
||||
local lastBeatSecs = song:GetLastSecond();
|
||||
|
||||
local bpms = timingData:GetBPMsAndTimes(true);
|
||||
local stops = timingData:GetStops(true);
|
||||
local delays = timingData:GetDelays(true);
|
||||
local warps = timingData:GetWarps(true);
|
||||
local fakes = timingData:GetFakes(true);
|
||||
local scrolls = timingData:GetScrolls(true);
|
||||
local speeds = timingData:GetSpeeds(true);
|
||||
|
||||
-- we don't want too many segments to be shown.
|
||||
local sumSegments = #bpms + #stops + #delays + #warps + #fakes + #scrolls + #speeds
|
||||
if sumSegments > maxSegments then
|
||||
return Def.ActorFrame{}
|
||||
end
|
||||
|
||||
local function CreateLine(beat, secs, firstShadow, firstDiffuse, secondShadow, firstEffect, secondEffect)
|
||||
local beatTime = timingData:GetElapsedTimeFromBeat(beat);
|
||||
if beatTime < 0 then beatTime = 0; end;
|
||||
return Def.ActorFrame {
|
||||
Def.Quad {
|
||||
InitCommand=function(self)
|
||||
self:shadowlength(0);
|
||||
self:shadowcolor(color(firstShadow));
|
||||
-- set width
|
||||
self:zoomto(math.max((secs/songLen)*fFrameWidth, 1), fFrameHeight);
|
||||
-- find location
|
||||
self:x((scale(beatTime,firstBeatSecs,lastBeatSecs,-fFrameWidth/2,fFrameWidth/2)));
|
||||
end;
|
||||
OnCommand=function(self)
|
||||
self:diffuse(color(firstDiffuse));
|
||||
end;
|
||||
};
|
||||
--[[ there's a cool effect that can't happen because we don't fade out like we did before
|
||||
Def.Quad {
|
||||
InitCommand=function(self)
|
||||
--self:diffuse(HSVA(192,1,0.8,0.8));
|
||||
self:shadowlength(0);
|
||||
self:shadowcolor(color(secondShadow));
|
||||
-- set width
|
||||
self:zoomto(math.max((secs/songLen)*fFrameWidth, 1),fFrameHeight);
|
||||
-- find location
|
||||
self:x((scale(beatTime,firstBeatSecs,lastBeatSecs,-fFrameWidth/2,fFrameWidth/2)));
|
||||
end;
|
||||
OnCommand=function(self)
|
||||
self:diffusealpha(1);
|
||||
self:diffuseshift();
|
||||
self:effectcolor1(color(firstEffect));
|
||||
self:effectcolor2(color(secondEffect));
|
||||
self:effectclock('beat');
|
||||
self:effectperiod(1/8);
|
||||
--
|
||||
self:diffusealpha(0);
|
||||
self:sleep(beatTime+1);
|
||||
self:diffusealpha(1);
|
||||
self:linear(4);
|
||||
self:diffusealpha(0);
|
||||
end;
|
||||
};]]
|
||||
};
|
||||
end;
|
||||
|
||||
for i=2,#bpms do
|
||||
bpmFrame[#bpmFrame+1] = CreateLine(bpms[i][1], 0,
|
||||
"#00808077", "#00808077", "#00808077", "#FF634777", "#FF000077");
|
||||
end;
|
||||
|
||||
for i=1,#delays do
|
||||
delayFrame[#delayFrame+1] = CreateLine(delays[i][1], delays[i][2],
|
||||
"#FFFF0077", "#FFFF0077", "#FFFF0077", "#00FF0077", "#FF000077");
|
||||
end;
|
||||
|
||||
for i=1,#stops do
|
||||
stopFrame[#stopFrame+1] = CreateLine(stops[i][1], stops[i][2],
|
||||
"#FFFFFF77", "#FFFFFF77", "#FFFFFF77", "#FFA50077", "#FF000077");
|
||||
end;
|
||||
|
||||
for i=1,#scrolls do
|
||||
scrollFrame[#scrollFrame+1] = CreateLine(scrolls[i][1], 0,
|
||||
"#4169E177", "#4169E177", "#4169E177", "#0000FF77", "#FF000077");
|
||||
end;
|
||||
|
||||
for i=1,#speeds do
|
||||
-- TODO: Turn beats into seconds for this calculation?
|
||||
speedFrame[#speedFrame+1] = CreateLine(speeds[i][1], 0,
|
||||
"#ADFF2F77", "#ADFF2F77", "#ADFF2F77", "#7CFC0077", "#FF000077");
|
||||
end;
|
||||
|
||||
for i=1,#warps do
|
||||
warpFrame[#warpFrame+1] = CreateLine(warps[i][1], 0,
|
||||
"#CC00CC77", "#CC00CC77", "#CC00CC77", "#FF33CC77", "#FF000077");
|
||||
end;
|
||||
|
||||
for i=1,#fakes do
|
||||
fakeFrame[#fakeFrame+1] = CreateLine(fakes[i][1], 0,
|
||||
"#BC8F8F77", "#BC8F8F77", "#BC8F8F77", "#F4A46077", "#FF000077");
|
||||
end;
|
||||
end;
|
||||
bars[#bars+1] = bpmFrame;
|
||||
bars[#bars+1] = scrollFrame;
|
||||
bars[#bars+1] = speedFrame;
|
||||
bars[#bars+1] = stopFrame;
|
||||
bars[#bars+1] = delayFrame;
|
||||
bars[#bars+1] = warpFrame;
|
||||
bars[#bars+1] = fakeFrame;
|
||||
t[#t+1] = bars;
|
||||
--addition here: increase performance a ton by only rendering once
|
||||
t[#t+1] = Def.ActorFrameTexture{Name="Target"}
|
||||
t[#t+1] = Def.Sprite{Name="Actual"}
|
||||
local FirstPass=true;
|
||||
local function Draw(self)
|
||||
kids=self:GetChildren();
|
||||
if FirstPass then
|
||||
kids.Target:setsize(fFrameWidth,fFrameHeight);
|
||||
kids.Target:EnableAlphaBuffer(true);
|
||||
kids.Target:Create();
|
||||
|
||||
kids.Target:GetTexture():BeginRenderingTo();
|
||||
for k,v in pairs(kids) do
|
||||
if k~="Target" and k~="Actual" then
|
||||
v:Draw();
|
||||
end
|
||||
end
|
||||
kids.Target:GetTexture():FinishRenderingTo();
|
||||
|
||||
kids.Actual:SetTexture(kids.Target:GetTexture());
|
||||
FirstPass=false;
|
||||
end
|
||||
kids.Actual:Draw();
|
||||
end
|
||||
t.InitCommand=function(self) self:SetDrawFunction(Draw); end
|
||||
end
|
||||
end
|
||||
return t
|
||||
end
|
||||
local t = LoadFallbackB()
|
||||
t[#t+1] = StandardDecorationFromFileOptional("ScoreFrame","ScoreFrame");
|
||||
|
||||
local function songMeterScale(val) return scale(val,0,1,-380/2,380/2) end
|
||||
|
||||
for pn in ivalues(PlayerNumber) do
|
||||
local MetricsName = "SongMeterDisplay" .. PlayerNumberToString(pn);
|
||||
local songMeterDisplay = Def.ActorFrame{
|
||||
InitCommand=function(self)
|
||||
self:player(pn);
|
||||
self:name(MetricsName);
|
||||
ActorUtil.LoadAllCommandsAndSetXY(self,Var "LoadingScreen");
|
||||
end;
|
||||
Def.Quad {
|
||||
InitCommand=cmd(zoomto,420,20);
|
||||
OnCommand=cmd(fadeleft,0.35;faderight,0.35;diffuse,Color.Black;diffusealpha,0.5);
|
||||
};
|
||||
LoadActor( THEME:GetPathG( 'SongMeterDisplay', 'frame ' .. PlayerNumberToString(pn) ) ) .. {
|
||||
InitCommand=function(self)
|
||||
self:name('Frame');
|
||||
ActorUtil.LoadAllCommandsAndSetXY(self,MetricsName);
|
||||
end;
|
||||
};
|
||||
Def.Quad {
|
||||
InitCommand=cmd(zoomto,2,8);
|
||||
OnCommand=cmd(x,songMeterScale(0.25);diffuse,PlayerColor(pn);diffusealpha,0.5);
|
||||
};
|
||||
Def.Quad {
|
||||
InitCommand=cmd(zoomto,2,8);
|
||||
OnCommand=cmd(x,songMeterScale(0.5);diffuse,PlayerColor(pn);diffusealpha,0.5);
|
||||
};
|
||||
Def.Quad {
|
||||
InitCommand=cmd(zoomto,2,8);
|
||||
OnCommand=cmd(x,songMeterScale(0.75);diffuse,PlayerColor(pn);diffusealpha,0.5);
|
||||
};
|
||||
Def.SongMeterDisplay {
|
||||
StreamWidth=THEME:GetMetric( MetricsName, 'StreamWidth' );
|
||||
Stream=LoadActor( THEME:GetPathG( 'SongMeterDisplay', 'stream ' .. PlayerNumberToString(pn) ) )..{
|
||||
InitCommand=cmd(diffuse,PlayerColor(pn);diffusealpha,0.5;blend,Blend.Add;);
|
||||
};
|
||||
Tip=LoadActor( THEME:GetPathG( 'SongMeterDisplay', 'tip ' .. PlayerNumberToString(pn) ) ) .. { InitCommand=cmd(visible,false); };
|
||||
};
|
||||
};
|
||||
if ThemePrefs.Get("TimingDisplay") == true then
|
||||
songMeterDisplay[#songMeterDisplay+1] = CreateSegments(pn);
|
||||
end
|
||||
t[#t+1] = songMeterDisplay
|
||||
end;
|
||||
|
||||
for pn in ivalues(PlayerNumber) do
|
||||
local MetricsName = "ToastyDisplay" .. PlayerNumberToString(pn);
|
||||
t[#t+1] = LoadActor( THEME:GetPathG("Player", 'toasty'), pn ) .. {
|
||||
InitCommand=function(self)
|
||||
self:player(pn);
|
||||
self:name(MetricsName);
|
||||
ActorUtil.LoadAllCommandsAndSetXY(self,Var "LoadingScreen");
|
||||
end;
|
||||
};
|
||||
end;
|
||||
|
||||
|
||||
t[#t+1] = StandardDecorationFromFileOptional("BPMDisplay","BPMDisplay");
|
||||
t[#t+1] = StandardDecorationFromFileOptional("StageDisplay","StageDisplay");
|
||||
t[#t+1] = StandardDecorationFromFileOptional("SongTitle","SongTitle");
|
||||
|
||||
return t
|
||||
@@ -1,31 +0,0 @@
|
||||
local longFail = ThemePrefs.Get("LongFail");
|
||||
|
||||
local t = Def.ActorFrame{};
|
||||
|
||||
if longFail then
|
||||
t[#t+1] = Def.Quad{
|
||||
InitCommand=cmd(FullScreen;diffuse,color("1,0,0,0");blend,Blend.Multiply);
|
||||
OnCommand=cmd(decelerate,1.25;diffuse,color("0.75,0,0,0.75");linear,7;diffuse,color("0,0,0,1");sleep,1.25;linear,1;diffuse,color("1,0,0,1");decelerate,2;diffuse,color("0,0,0,1"));
|
||||
};
|
||||
t[#t+1] = Def.Quad{
|
||||
InitCommand=cmd(FullScreen;diffuse,color("1,1,1,1");diffusealpha,0);
|
||||
OnCommand=cmd(finishtweening;diffusealpha,1;decelerate,1.25;diffuse,color("1,0,0,0"));
|
||||
};
|
||||
t[#t+1] = LoadActor(THEME:GetPathS( "ScreenGameplayAlternate", "failed" ) ) .. {
|
||||
StartTransitioningCommand=cmd(play);
|
||||
};
|
||||
else
|
||||
t[#t+1] = Def.Quad{
|
||||
InitCommand=cmd(FullScreen;diffuse,color("1,0,0,0");blend,Blend.Multiply);
|
||||
OnCommand=cmd(smooth,1;diffuse,color("0.75,0,0,0.75");decelerate,2;diffuse,color("0,0,0,1"));
|
||||
};
|
||||
t[#t+1] = Def.Quad{
|
||||
InitCommand=cmd(FullScreen;diffuse,color("1,1,1,1");diffusealpha,0);
|
||||
OnCommand=cmd(finishtweening;diffusealpha,1;decelerate,1.25;diffuse,color("1,0,0,0"));
|
||||
};
|
||||
t[#t+1] = LoadActor(THEME:GetPathS( Var "LoadingScreen", "failed" ) ) .. {
|
||||
StartTransitioningCommand=cmd(play);
|
||||
};
|
||||
end;
|
||||
|
||||
return t;
|
||||
@@ -1,9 +0,0 @@
|
||||
if IsNetSMOnline() then
|
||||
-- don't show "Ready" online; it will obscure the immediately-starting steps.
|
||||
return Def.ActorFrame{}
|
||||
end
|
||||
|
||||
return LoadActor("go") .. {
|
||||
InitCommand=cmd(Center;draworder,105);
|
||||
StartTransitioningCommand=cmd(zoom,1.3;diffusealpha,0;bounceend,0.25;zoom,1;diffusealpha,1;linear,0.15;glow,BoostColor(Color("Blue"),1.75);decelerate,0.3;glow,1,1,1,0;sleep,1-0.45;linear,0.25;diffusealpha,0;);
|
||||
};
|
||||
|
Before Width: | Height: | Size: 14 KiB |
@@ -1,15 +0,0 @@
|
||||
local t = Def.ActorFrame {};
|
||||
t[#t+1] = Def.Sprite {
|
||||
InitCommand=cmd(Center;diffusealpha,1);
|
||||
BeginCommand=cmd(LoadFromCurrentSongBackground);
|
||||
OnCommand=function(self)
|
||||
if PREFSMAN:GetPreference("StretchBackgrounds") then
|
||||
self:SetSize(SCREEN_WIDTH,SCREEN_HEIGHT)
|
||||
else
|
||||
self:scale_or_crop_background()
|
||||
end
|
||||
self:linear(1)
|
||||
self:diffusealpha(0)
|
||||
end;
|
||||
};
|
||||
return t;
|
||||
@@ -1,39 +0,0 @@
|
||||
local t = Def.ActorFrame{};
|
||||
|
||||
if not GAMESTATE:IsCourseMode() then return t; end;
|
||||
|
||||
t[#t+1] = Def.Sprite {
|
||||
InitCommand=cmd(Center);
|
||||
BeforeLoadingNextCourseSongMessageCommand=function(self) self:LoadFromSongBackground( SCREENMAN:GetTopScreen():GetNextCourseSong() ) end;
|
||||
ChangeCourseSongInMessageCommand=cmd(scale_or_crop_background);
|
||||
StartCommand=cmd(diffusealpha,0;decelerate,0.5;diffusealpha,1;);
|
||||
FinishCommand=cmd(linear,0.1;glow,Color.Alpha(Color("White"),0.5);decelerate,0.4;glow,Color("Invisible");diffusealpha,0);
|
||||
};
|
||||
|
||||
t[#t+1] = Def.ActorFrame {
|
||||
InitCommand=cmd(Center);
|
||||
OnCommand=cmd(stoptweening;addx,30;linear,3;addx,-30);
|
||||
LoadFont("Common Normal") .. {
|
||||
InitCommand=cmd(strokecolor,Color("Outline");y,-10);
|
||||
BeforeLoadingNextCourseSongMessageCommand=function(self)
|
||||
local NextSong = SCREENMAN:GetTopScreen():GetNextCourseSong();
|
||||
self:settext( NextSong:GetDisplayFullTitle() );
|
||||
end;
|
||||
StartCommand=cmd(faderight,1;diffusealpha,0;linear,0.5;faderight,0;diffusealpha,1;sleep,1.5;linear,0.5;diffusealpha,0);
|
||||
};
|
||||
--[[ LoadFont("Common Normal") .. {
|
||||
Text=GAMESTATE:IsCourseMode() and GAMESTATE:GetCurrentCourse():GetCourseType() or GAMESTATE:GetCurrentSong():GetDisplayArtist();
|
||||
InitCommand=cmd(strokecolor,Color("Outline");zoom,0.75);
|
||||
OnCommand=cmd(faderight,1;diffusealpha,0;linear,0.5;faderight,0;diffusealpha,1;sleep,1.5;linear,0.5;diffusealpha,0);
|
||||
}; --]]
|
||||
LoadFont("Common Normal") .. {
|
||||
InitCommand=cmd(strokecolor,Color("Outline");diffuse,Color("Orange");diffusebottomedge,Color("Yellow");zoom,0.75;y,10);
|
||||
BeforeLoadingNextCourseSongMessageCommand=function(self)
|
||||
local NextSong = SCREENMAN:GetTopScreen():GetNextCourseSong();
|
||||
self:settext( SecondsToMSSMsMs( NextSong:MusicLengthSeconds() ) );
|
||||
end;
|
||||
StartCommand=cmd(faderight,1;diffusealpha,0;linear,0.5;faderight,0;diffusealpha,1;sleep,1.5;linear,0.5;diffusealpha,0);
|
||||
};
|
||||
};
|
||||
|
||||
return t;
|
||||
@@ -1,50 +0,0 @@
|
||||
local raveChildren
|
||||
|
||||
local bg = Def.ActorFrame{
|
||||
Def.Quad{
|
||||
InitCommand=cmd(FullScreen;diffuse,color("0,0,0,0"));
|
||||
OnCommand=cmd(linear,5;diffusealpha,1);
|
||||
};
|
||||
|
||||
Def.ActorFrame{
|
||||
Name="RaveMessages";
|
||||
InitCommand=function(self)
|
||||
raveChildren = self:GetChildren()
|
||||
self:visible(GAMESTATE:GetPlayMode() == 'PlayMode_Rave')
|
||||
|
||||
raveChildren.P1Win:visible(false)
|
||||
raveChildren.P2Win:visible(false)
|
||||
raveChildren.Draw:visible(false)
|
||||
end;
|
||||
OffCommand=function(self)
|
||||
local p1Win = GAMESTATE:IsWinner(PLAYER_1)
|
||||
local p2Win = GAMESTATE:IsWinner(PLAYER_2)
|
||||
|
||||
if GAMESTATE:IsWinner(PLAYER_1) then
|
||||
raveChildren.P1Win:visible(true)
|
||||
elseif GAMESTATE:IsWinner(PLAYER_2) then
|
||||
raveChildren.P2Win:visible(true)
|
||||
else
|
||||
raveChildren.Draw:visible(true)
|
||||
end
|
||||
end;
|
||||
|
||||
LoadActor(THEME:GetPathG("_rave result","P1"))..{
|
||||
Name="P1Win";
|
||||
InitCommand=cmd(Center;cropbottom,1;fadebottom,1;);
|
||||
OnCommand=cmd(sleep,2;linear,0.5;cropbottom,0;fadebottom,0;sleep,1.75;linear,0.25;diffusealpha,0);
|
||||
};
|
||||
LoadActor(THEME:GetPathG("_rave result","P2"))..{
|
||||
Name="P2Win";
|
||||
InitCommand=cmd(Center;cropbottom,1;fadebottom,1;);
|
||||
OnCommand=cmd(sleep,2;linear,0.5;cropbottom,0;fadebottom,0;sleep,1.75;linear,0.25;diffusealpha,0);
|
||||
};
|
||||
LoadActor(THEME:GetPathG("_rave result","draw"))..{
|
||||
Name="Draw";
|
||||
InitCommand=cmd(Center;cropbottom,1;fadebottom,1;);
|
||||
OnCommand=cmd(sleep,2;linear,0.5;cropbottom,0;fadebottom,0;sleep,1.75;linear,0.25;diffusealpha,0);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
return bg
|
||||
@@ -1,41 +0,0 @@
|
||||
local t = Def.ActorFrame {};
|
||||
local function UpdateTime(self)
|
||||
local c = self:GetChildren();
|
||||
for pn in ivalues(PlayerNumber) do
|
||||
local vStats = STATSMAN:GetCurStageStats():GetPlayerStageStats( pn );
|
||||
local vTime;
|
||||
local obj = self:GetChild( string.format("RemainingTime" .. PlayerNumberToString(pn) ) );
|
||||
if vStats and obj then
|
||||
vTime = vStats:GetLifeRemainingSeconds()
|
||||
obj:settext( SecondsToMMSSMsMs( vTime ) );
|
||||
end;
|
||||
end;
|
||||
end
|
||||
if GAMESTATE:GetCurrentCourse() then
|
||||
if GAMESTATE:GetCurrentCourse():GetCourseType() == "CourseType_Survival" then
|
||||
-- RemainingTime
|
||||
for pn in ivalues(PlayerNumber) do
|
||||
local MetricsName = "RemainingTime" .. PlayerNumberToString(pn);
|
||||
t[#t+1] = LoadActor( THEME:GetPathG( Var "LoadingScreen", "RemainingTime"), pn ) .. {
|
||||
InitCommand=function(self)
|
||||
self:player(pn);
|
||||
self:name(MetricsName);
|
||||
ActorUtil.LoadAllCommandsAndSetXY(self,Var "LoadingScreen");
|
||||
end;
|
||||
};
|
||||
end
|
||||
for pn in ivalues(PlayerNumber) do
|
||||
local MetricsName = "DeltaSeconds" .. PlayerNumberToString(pn);
|
||||
t[#t+1] = LoadActor( THEME:GetPathG( Var "LoadingScreen", "DeltaSeconds"), pn ) .. {
|
||||
InitCommand=function(self)
|
||||
self:player(pn);
|
||||
self:name(MetricsName);
|
||||
ActorUtil.LoadAllCommandsAndSetXY(self,Var "LoadingScreen");
|
||||
end;
|
||||
};
|
||||
end
|
||||
end;
|
||||
end;
|
||||
t.InitCommand=cmd(SetUpdateFunction,UpdateTime);
|
||||
t[#t+1]= LoadActor(THEME:GetPathG("", "pause_menu"))
|
||||
return t
|
||||
@@ -1,9 +0,0 @@
|
||||
if IsNetSMOnline() then
|
||||
-- don't show "Ready" online; it will obscure the immediately-starting steps.
|
||||
return Def.ActorFrame{}
|
||||
end
|
||||
|
||||
return LoadActor("ready") .. {
|
||||
InitCommand=cmd(Center;draworder,105);
|
||||
StartTransitioningCommand=cmd(zoom,1.3;diffusealpha,0;bounceend,0.25;zoom,1;diffusealpha,1;linear,0.15;glow,BoostColor(Color("Orange"),1.75);decelerate,0.3;glow,1,1,1,0;sleep,1-0.45;linear,0.25;diffusealpha,0;);
|
||||
};
|
||||
|
Before Width: | Height: | Size: 22 KiB |
@@ -1,6 +0,0 @@
|
||||
return Def.ActorFrame {
|
||||
-- InitCommand=cmd(x,SCREEN_RIGHT;y,SCREEN_BOTTOM;draworder,101);
|
||||
StartTransitioningCommand=function(self)
|
||||
MESSAGEMAN:Broadcast("Toasty",{ Time = math.random(1,3) });
|
||||
end
|
||||
};
|
||||
@@ -1,172 +0,0 @@
|
||||
local cursor_width_padding = 16
|
||||
local cursor_spacing_value = 30
|
||||
|
||||
local heart_xs= {
|
||||
[PLAYER_1]= SCREEN_CENTER_X * 0.625,
|
||||
[PLAYER_2]= SCREEN_CENTER_X * 1.375,
|
||||
}
|
||||
|
||||
local heart_entries= {}
|
||||
for i, pn in ipairs(GAMESTATE:GetEnabledPlayers()) do
|
||||
local profile= PROFILEMAN:GetProfile(pn)
|
||||
if profile and profile:GetIgnoreStepCountCalories() then
|
||||
heart_entries[pn]= new_numpad_entry{
|
||||
Name= pn .. "_heart_entry",
|
||||
InitCommand= cmd(xy, heart_xs[pn], SCREEN_CENTER_Y+48),
|
||||
value = LoadFont("Common Large") .. {
|
||||
InitCommand=cmd(xy,0,-62),
|
||||
OnCommand=cmd(zoom,0.75;diffuse,PlayerColor(pn);strokecolor,ColorDarkTone(PlayerColor(pn)));
|
||||
SetCommand=function(self, param)
|
||||
self:settext(param[1])
|
||||
end,
|
||||
},
|
||||
button = LoadFont("Common Normal") ..{
|
||||
InitCommand=cmd(shadowlength,1),
|
||||
SetCommand=function(self, param)
|
||||
self:settext(param[1])
|
||||
end,
|
||||
OnCommand=cmd(diffuse,color("0.8,0.8,0.8,1");zoom,0.875),
|
||||
GainFocusCommand=cmd(finishtweening;decelerate,0.125;zoom,1;diffuse,Color.White),
|
||||
LoseFocusCommand=cmd(finishtweening;smooth,0.1;zoom,0.875;diffuse,color("0.8,0.8,0.8,1"))
|
||||
},
|
||||
button_positions = {{-cursor_spacing_value, -cursor_spacing_value}, {0, -cursor_spacing_value}, {cursor_spacing_value, -cursor_spacing_value},
|
||||
{-cursor_spacing_value, 0}, {0, 0}, {cursor_spacing_value, 0},
|
||||
{-cursor_spacing_value, cursor_spacing_value}, {0, cursor_spacing_value}, {cursor_spacing_value, cursor_spacing_value},
|
||||
{-cursor_spacing_value, cursor_spacing_value*2}, {0, cursor_spacing_value*2}, {cursor_spacing_value, cursor_spacing_value*2}},
|
||||
cursor = Def.ActorFrame {
|
||||
-- Move whole container
|
||||
MoveCommand=function(self, param)
|
||||
self:stoptweening()
|
||||
self:decelerate(0.15)
|
||||
self:xy(param[1], param[2])
|
||||
if param[3] then
|
||||
self:z(param[3])
|
||||
end
|
||||
end,
|
||||
--
|
||||
LoadActor( THEME:GetPathG("_frame", "1D"),
|
||||
{ 2/18, 14/18, 2/18 },
|
||||
LoadActor(THEME:GetPathB("_frame", "cursors/rounded fill"))
|
||||
) .. {
|
||||
OnCommand=cmd(diffuse,PlayerDarkColor(pn)),
|
||||
FitCommand=function(self, param)
|
||||
self:playcommand("SetSize",{ Width=param:GetWidth()+cursor_width_padding, tween=cmd(stoptweening;decelerate,0.15)})
|
||||
end,
|
||||
},
|
||||
LoadActor( THEME:GetPathG("_frame", "1D"),
|
||||
{ 2/18, 14/18, 2/18 },
|
||||
LoadActor(THEME:GetPathB("_frame", "cursors/rounded gloss"))
|
||||
) .. {
|
||||
OnCommand=cmd(diffuse,PlayerColor(pn)),
|
||||
FitCommand=function(self, param)
|
||||
self:playcommand("SetSize",{ Width=param:GetWidth()+cursor_width_padding, tween=cmd(stoptweening;decelerate,0.15)})
|
||||
end,
|
||||
}
|
||||
},
|
||||
cursor_draw= "first",
|
||||
prompt = LoadFont("Common Bold") .. {
|
||||
Name="prompt",
|
||||
Text=THEME:GetString("ScreenHeartEntry", "Heart Rate"),
|
||||
InitCommand=cmd(xy,0,-96);
|
||||
OnCommand=cmd(shadowlength,1;skewx,-0.125;diffusebottomedge,color("#DDDDDD");strokecolor,Color.Outline);
|
||||
},
|
||||
max_value= 300,
|
||||
auto_done_value= 100,
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
local function input(event)
|
||||
local pn= event.PlayerNumber
|
||||
if not pn then return end
|
||||
if event.type == "InputEventType_Release" then return end
|
||||
if not heart_entries[pn] then return end
|
||||
local done= heart_entries[pn]:handle_input(event.GameButton)
|
||||
if done then
|
||||
SOUND:PlayOnce(THEME:GetPathS("Common", "Start"), true)
|
||||
local all_done= true
|
||||
for pn, entry in pairs(heart_entries) do
|
||||
if not entry.done then all_done= false break end
|
||||
end
|
||||
if all_done then
|
||||
for pn, entry in pairs(heart_entries) do
|
||||
local profile= PROFILEMAN:GetProfile(pn)
|
||||
if profile and profile:GetIgnoreStepCountCalories() then
|
||||
local calories= profile:CalculateCaloriesFromHeartRate(
|
||||
entry.value, GAMESTATE:GetLastGameplayDuration())
|
||||
profile:AddCaloriesToDailyTotal(calories)
|
||||
end
|
||||
end
|
||||
SCREENMAN:GetTopScreen():StartTransitioningScreen("SM_GoToNextScreen")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local timer_text
|
||||
local function timer_update(self)
|
||||
local time= math.floor((self:GetSecsIntoEffect() % 60) * 10) / 10
|
||||
if time < 10 then
|
||||
timer_text:settext(("0%.1f"):format(time))
|
||||
else
|
||||
timer_text:settext(("%.1f"):format(time))
|
||||
end
|
||||
end
|
||||
|
||||
local args= {
|
||||
--
|
||||
Def.ActorFrame{
|
||||
Name= "timer",
|
||||
InitCommand= function(self)
|
||||
self:effectperiod(2^16)
|
||||
timer_text= self:GetChild("timer_text")
|
||||
self:SetUpdateFunction(timer_update)
|
||||
end,
|
||||
OnCommand= function(self)
|
||||
SCREENMAN:GetTopScreen():AddInputCallback(input)
|
||||
end,
|
||||
Def.BitmapText{
|
||||
Name= "timer_text", Font= "Common Normal", Text= "00.0",
|
||||
InitCommand= cmd(xy, SCREEN_CENTER_X, SCREEN_CENTER_Y-80; diffuse, Color.White),
|
||||
OnCommand= cmd(strokecolor,Color.Outline),
|
||||
}
|
||||
},
|
||||
Def.Quad {
|
||||
InitCommand=cmd(xy, SCREEN_CENTER_X+1, SCREEN_CENTER_Y-100+1;zoomto,2,2);
|
||||
OnCommand=cmd(diffuse,Color.Black;diffusealpha,0.5;linear,0.25;zoomtowidth,420;fadeleft,0.25;faderight,0.25);
|
||||
};
|
||||
Def.Quad {
|
||||
InitCommand=cmd(xy, SCREEN_CENTER_X, SCREEN_CENTER_Y-100;zoomto,2,2);
|
||||
OnCommand=cmd(diffuse,color("#ffd400");shadowcolor,BoostColor(color("#ffd40077"),0.25);linear,0.25;zoomtowidth,420;fadeleft,0.25;faderight,0.25);
|
||||
};
|
||||
Def.BitmapText {
|
||||
Name= "explanation", Font= "Common Large",
|
||||
Text= string.upper(THEME:GetString("ScreenHeartEntry", "Enter Heart Rate")),
|
||||
InitCommand= cmd(xy, SCREEN_CENTER_X, SCREEN_CENTER_Y-128; diffuse, Color.White),
|
||||
OnCommand=cmd(skewx,-0.125;diffuse,color("#ffd400");strokecolor,ColorDarkTone(color("#ffd400")))}
|
||||
,
|
||||
|
||||
Def.BitmapText{
|
||||
Name= "song_len_label", Font= "Common Normal",
|
||||
Text= THEME:GetString("ScreenHeartEntry", "Song Length"),
|
||||
InitCommand= cmd(xy, SCREEN_CENTER_X, SCREEN_CENTER_Y+192-32; diffuse, Color.White),
|
||||
OnCommand= cmd(shadowlength,1)},
|
||||
Def.BitmapText{
|
||||
Name= "song_len", Font= "Common Normal",
|
||||
Text= SecondsToMMSS(GAMESTATE:GetLastGameplayDuration()),
|
||||
InitCommand= cmd(xy, SCREEN_CENTER_X, SCREEN_CENTER_Y+192-8; diffuse, Color.White),
|
||||
OnCommand= cmd(shadowlength,1;zoom,0.75),
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
for pn in ivalues(GAMESTATE:GetEnabledPlayers()) do
|
||||
args[#args+1] = LoadActor(THEME:GetPathB("_frame","3x3"),"rounded black", 128, 192) .. {
|
||||
InitCommand=cmd(x,heart_xs[pn];y,SCREEN_CENTER_Y+28),
|
||||
}
|
||||
end
|
||||
|
||||
for pn, entry in pairs(heart_entries) do
|
||||
args[#args+1]= entry:create_actors()
|
||||
end
|
||||
|
||||
return Def.ActorFrame(args)
|
||||
|
Before Width: | Height: | Size: 878 B |
@@ -1,47 +0,0 @@
|
||||
local t = LoadFallbackB();
|
||||
|
||||
local StepsType = ToEnumShortString( GAMEMAN:GetFirstStepsTypeForGame(GAMESTATE:GetCurrentGame()) );
|
||||
local stString = THEME:GetString("StepsType",StepsType);
|
||||
|
||||
local NumColumns = THEME:GetMetric(Var "LoadingScreen", "NumColumns");
|
||||
|
||||
t[#t+1] = Def.ActorFrame {
|
||||
InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y-160);
|
||||
Def.Quad {
|
||||
InitCommand=cmd(zoomto,SCREEN_WIDTH, 32);
|
||||
OnCommand=cmd(y,-16;diffuse,Color.Black;fadebottom,0.8);
|
||||
};
|
||||
Def.Quad {
|
||||
InitCommand=cmd(zoomto,SCREEN_WIDTH, 56);
|
||||
OnCommand=cmd(diffuse,color("#333333");diffusealpha,0.75;fadebottom,0.35);
|
||||
};
|
||||
};
|
||||
|
||||
for i=1,NumColumns do
|
||||
local st = THEME:GetMetric(Var "LoadingScreen","ColumnStepsType" .. i);
|
||||
local dc = THEME:GetMetric(Var "LoadingScreen","ColumnDifficulty" .. i);
|
||||
local s = GetCustomDifficulty( st, dc );
|
||||
|
||||
t[#t+1] = Def.ActorFrame {
|
||||
InitCommand=cmd(x,SCREEN_CENTER_X-60 + 80 * (i-1);y,SCREEN_CENTER_Y-168);
|
||||
LoadActor(THEME:GetPathB("_frame","3x1"),"rounded fill", 18) .. {
|
||||
OnCommand=cmd(diffuse,CustomDifficultyToDarkColor(s);diffusealpha,0.5);
|
||||
};
|
||||
LoadActor(THEME:GetPathB("_frame","3x1"),"rounded gloss", 18) .. {
|
||||
OnCommand=cmd(diffuse,CustomDifficultyToColor(s);diffusealpha,0.125);
|
||||
};
|
||||
LoadFont("Common Normal") .. {
|
||||
InitCommand=cmd(uppercase,true;settext,CustomDifficultyToLocalizedString(s));
|
||||
OnCommand=cmd(zoom,0.675;maxwidth,80/0.675;diffuse,CustomDifficultyToColor(s);shadowlength,1);
|
||||
};
|
||||
};
|
||||
end
|
||||
|
||||
t[#t+1] = LoadFont("Common Bold") .. {
|
||||
InitCommand=cmd(settext,stString;x,SCREEN_CENTER_X-220;y,SCREEN_CENTER_Y-168);
|
||||
OnCommand=cmd(skewx,-0.125;diffusebottomedge,color("0.75,0.75,0.75");shadowlength,2);
|
||||
};
|
||||
|
||||
t.OnCommand=cmd(draworder,105);
|
||||
|
||||
return t;
|
||||
@@ -1 +0,0 @@
|
||||
ScreenWithMenuElements background
|
||||
@@ -1,13 +0,0 @@
|
||||
-- how does installed song??? let's find out
|
||||
|
||||
local t = Def.ActorFrame{
|
||||
LoadFont("Common Normal")..{
|
||||
Name="Header";
|
||||
InitCommand=cmd(x,SCREEN_LEFT+24;y,SCREEN_TOP+24;halign,0;diffuse,color("#CCCCCC");settext,Screen.String("BodyHeader");shadowlength,1;shadowcolor,HSV(40,0,0.6);diffusetopedge,color("#FFFFFF"));
|
||||
OnCommand=cmd(queuecommand,"Anim");
|
||||
AnimCommand=cmd(cropright,1;faderight,1;addx,96;decelerate,1;addx,-96;skewx,-0.1;cropright,0;faderight,0;);
|
||||
};
|
||||
-- todo: add explantion paragraph here (above the scroller)
|
||||
};
|
||||
|
||||
return t;
|
||||
|
Before Width: | Height: | Size: 5.9 KiB |
@@ -1,4 +0,0 @@
|
||||
return LoadActor("bg.png") ..{
|
||||
InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;zoomtowidth,SCREEN_WIDTH;zoomtoheight,SCREEN_HEIGHT);
|
||||
OnCommand=cmd(texcoordvelocity,0,-1;customtexturerect,0,0,SCREEN_WIDTH/self:GetWidth(),SCREEN_HEIGHT/self:GetHeight();diffuse,color("0.9,0.9,0.9,1"));
|
||||
};
|
||||
@@ -1,3 +0,0 @@
|
||||
local t = LoadFallbackB();
|
||||
t[#t+1] = LoadActor( THEME:GetPathB("_Arcade","decorations") );
|
||||
return t
|
||||
@@ -1,6 +0,0 @@
|
||||
return LoadFont("Common Normal") .. {
|
||||
Text=ScreenString("Feet");
|
||||
BeginCommand=function(self)
|
||||
self:AddAttribute(5, {Length= 4, Diffuse=Color.Red})
|
||||
end;
|
||||
};
|
||||
@@ -1,18 +0,0 @@
|
||||
return Def.ActorFrame {
|
||||
LoadActor(THEME:GetPathB("_frame","3x3"),"rounded black",380,80);
|
||||
Def.Quad {
|
||||
Name="Underline";
|
||||
InitCommand=cmd(y,-12);
|
||||
OnCommand=cmd(diffuse,color("#ffd400");shadowlength,1;zoomtowidth,192;fadeleft,0.25;faderight,0.25);
|
||||
};
|
||||
LoadFont("Common Bold") .. {
|
||||
Text=ScreenString("Information");
|
||||
InitCommand=cmd(y,-26);
|
||||
OnCommand=cmd(skewx,-0.125;diffuse,color("#ffd400");shadowlength,2;shadowcolor,BoostColor(color("#ffd40077"),0.25))
|
||||
};
|
||||
LoadFont("Common Normal") .. {
|
||||
Text=ScreenString("Jump");
|
||||
InitCommand=cmd(y,18;wrapwidthpixels,480;vertspacing,-12;shadowlength,1);
|
||||
OnCommand=cmd(zoom,0.875);
|
||||
};
|
||||
};
|
||||
@@ -1,18 +0,0 @@
|
||||
return Def.ActorFrame {
|
||||
LoadActor(THEME:GetPathB("_frame","3x3"),"rounded black",380,80);
|
||||
Def.Quad {
|
||||
Name="Underline";
|
||||
InitCommand=cmd(y,-12);
|
||||
OnCommand=cmd(diffuse,color("#ffd400");shadowlength,1;zoomtowidth,192;fadeleft,0.25;faderight,0.25);
|
||||
};
|
||||
LoadFont("Common Bold") .. {
|
||||
Text=ScreenString("Information");
|
||||
InitCommand=cmd(y,-26);
|
||||
OnCommand=cmd(skewx,-0.125;diffuse,color("#ffd400");shadowlength,2;shadowcolor,BoostColor(color("#ffd40077"),0.25))
|
||||
};
|
||||
LoadFont("Common Normal") .. {
|
||||
Text=ScreenString("Miss");
|
||||
InitCommand=cmd(y,18;wrapwidthpixels,480;vertspacing,-12;shadowlength,1);
|
||||
OnCommand=cmd(zoom,0.75);
|
||||
};
|
||||
};
|
||||
@@ -1,18 +0,0 @@
|
||||
return Def.ActorFrame {
|
||||
LoadActor(THEME:GetPathB("_frame","3x3"),"rounded black",380,80);
|
||||
Def.Quad {
|
||||
Name="Underline";
|
||||
InitCommand=cmd(y,-12);
|
||||
OnCommand=cmd(diffuse,color("#ffd400");shadowlength,1;zoomtowidth,192;fadeleft,0.25;faderight,0.25);
|
||||
};
|
||||
LoadFont("Common Bold") .. {
|
||||
Text=ScreenString("Information");
|
||||
InitCommand=cmd(y,-26);
|
||||
OnCommand=cmd(skewx,-0.125;diffuse,color("#ffd400");shadowlength,2;shadowcolor,BoostColor(color("#ffd40077"),0.25))
|
||||
};
|
||||
LoadFont("Common Normal") .. {
|
||||
Text=ScreenString("Tap");
|
||||
InitCommand=cmd(y,18;wrapwidthpixels,480;vertspacing,-12;shadowlength,1);
|
||||
OnCommand=cmd(zoom,0.875);
|
||||
};
|
||||
};
|
||||
@@ -1,94 +0,0 @@
|
||||
return Def.ActorFrame {
|
||||
Def.ActorFrame {
|
||||
OnCommand=cmd(x,SCREEN_CENTER_X-20);
|
||||
|
||||
-- Initial glow around receptors
|
||||
LoadActor("tapglow") .. {
|
||||
OnCommand=cmd(x,85;y,95;zoom,0.7;rotationz,90;diffuseshift;effectcolor1,1,0.93333,0.266666,0.4;effectcolor2,1,1,1,1;effectperiod,0.25;effectmagnitude,0,1,0;diffusealpha,0;sleep,6;linear,0;diffusealpha,1;sleep,1.7;linear,0;diffusealpha,0);
|
||||
};
|
||||
LoadActor("tapglow") .. {
|
||||
OnCommand=cmd(x,275;y,95;zoom,0.7;rotationz,270;diffuseshift;effectcolor1,1,0.93333,0.266666,0.4;effectcolor2,1,1,1,1;effectperiod,0.25;effectmagnitude,0,1,0;diffusealpha,0;sleep,6;linear,0;diffusealpha,1;sleep,1.7;linear,0;diffusealpha,0);
|
||||
};
|
||||
LoadActor("tapglow") .. {
|
||||
OnCommand=cmd(x,212;y,95;zoom,0.7;rotationz,180;diffuseshift;effectcolor1,1,0.93333,0.266666,0.4;effectcolor2,1,1,1,1;effectperiod,0.25;effectmagnitude,0,1,0;diffusealpha,0;sleep,6;linear,0;diffusealpha,1;sleep,1.7;linear,0;diffusealpha,0);
|
||||
};
|
||||
LoadActor("tapglow") .. {
|
||||
OnCommand=cmd(x,148;y,95;zoom,0.7;diffuseshift;effectcolor1,1,0.93333,0.266666,0.4;effectcolor2,1,1,1,1;effectperiod,0.25;effectmagnitude,0,1,0;diffusealpha,0;sleep,6;linear,0;diffusealpha,1;sleep,1.7;linear,0;diffusealpha,0);
|
||||
};
|
||||
|
||||
LoadActor("tapglow") .. {
|
||||
OnCommand=cmd(x,148;y,95;zoom,0.7;diffuseshift;effectcolor1,1,0.93333,0.266666,0.4;effectcolor2,1,1,1,1;effectperiod,0.25;effectmagnitude,0,1,0;diffusealpha,0;sleep,9.7;linear,0;diffusealpha,1;sleep,1.7;linear,0;diffusealpha,0);
|
||||
};
|
||||
|
||||
-- 2nd step UP
|
||||
LoadActor("tapglow") .. {
|
||||
OnCommand=cmd(x,212;y,95;zoom,0.7;rotationz,180;diffuseshift;effectcolor1,1,0.93333,0.266666,0.4;effectcolor2,1,1,1,1;effectperiod,0.25;effectmagnitude,0,1,0;diffusealpha,0;sleep,12.7;linear,0;diffusealpha,1;sleep,1.7;linear,0;diffusealpha,0);
|
||||
};
|
||||
|
||||
-- 3rd step UP
|
||||
LoadActor("tapglow") .. {
|
||||
OnCommand=cmd(x,84;y,95;zoom,0.7;rotationz,90;diffuseshift;effectcolor1,1,0.93333,0.266666,0.4;effectcolor2,1,1,1,1;effectperiod,0.25;effectmagnitude,0,1,0;diffusealpha,0;sleep,15.7;linear,0;diffusealpha,1;sleep,1.7;linear,0;diffusealpha,0);
|
||||
};
|
||||
|
||||
-- 4th step jump
|
||||
LoadActor("tapglow") .. {
|
||||
OnCommand=cmd(x,85;y,95;zoom,0.7;rotationz,90;diffuseshift;effectcolor1,1,0.93333,0.266666,0.4;effectcolor2,1,1,1,1;effectperiod,0.25;effectmagnitude,0,1,0;diffusealpha,0;sleep,18.7;linear,0;diffusealpha,1;sleep,1.7;linear,0;diffusealpha,0);
|
||||
};
|
||||
LoadActor("tapglow") .. {
|
||||
OnCommand=cmd(x,275;y,95;zoom,0.7;rotationz,270;diffuseshift;effectcolor1,1,0.93333,0.266666,0.4;effectcolor2,1,1,1,1;effectperiod,0.25;effectmagnitude,0,1,0;diffusealpha,0;sleep,18.7;linear,0;diffusealpha,1;sleep,1.7;linear,0;diffusealpha,0);
|
||||
};
|
||||
|
||||
-- miss step
|
||||
LoadActor("healthhilight") .. {
|
||||
OnCommand=cmd(x,180;y,40;diffuseshift;effectcolor1,1,0.93333,0.266666,0.4;effectcolor2,1,1,1,1;effectperiod,0.25;effectmagnitude,0,1,0;diffusealpha,0;sleep,22.7;linear,0;diffusealpha,1;sleep,1.7;linear,0;diffusealpha,0);
|
||||
};
|
||||
};
|
||||
|
||||
-- messages
|
||||
LoadFont("Common Bold") .. {
|
||||
Text=ScreenString("How To Play StepMania"),
|
||||
InitCommand=cmd(zbuffer,1;z,20;x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;shadowlength,1;strokecolor,Color("Outline"));
|
||||
BeginCommand=function(self)
|
||||
self:AddAttribute(12, {Length=9, Diffuse=Color.White});
|
||||
end;
|
||||
OnCommand=cmd(skewx,-0.125;diffuse,color("#ffd400");shadowlength,2;shadowcolor,BoostColor(color("#ffd40077"),0.25);diffusealpha,0;zoom,4;sleep,0.0;linear,0.3;diffusealpha,1;zoom,1;sleep,1.8;linear,0.3;zoom,0.75;x,170;y,60);
|
||||
};
|
||||
LoadActor("_howtoplay feet") .. {
|
||||
InitCommand=cmd(shadowlength,1;strokecolor,Color.Outline);
|
||||
OnCommand=cmd(z,20;x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;addx,-SCREEN_WIDTH;sleep,2.4;decelerate,0.3;addx,SCREEN_WIDTH;sleep,2;linear,0.3;zoomy,0);
|
||||
};
|
||||
Def.ActorFrame {
|
||||
InitCommand=cmd(x,SCREEN_CENTER_X+120;y,SCREEN_CENTER_Y+40);
|
||||
|
||||
LoadActor("_howtoplay tap")..{
|
||||
InitCommand=cmd(diffusealpha,0);
|
||||
ShowCommand=cmd(linear,0;diffusealpha,1;sleep,2;linear,0;diffusealpha,0);
|
||||
OnCommand=cmd(sleep,6;queuecommand,"Show");
|
||||
};
|
||||
LoadActor("_howtoplay tap")..{
|
||||
InitCommand=cmd(diffusealpha,0);
|
||||
ShowCommand=cmd(linear,0;diffusealpha,1;sleep,2;linear,0;diffusealpha,0);
|
||||
OnCommand=cmd(sleep,9.7;queuecommand,"Show");
|
||||
};
|
||||
LoadActor("_howtoplay tap")..{
|
||||
InitCommand=cmd(diffusealpha,0);
|
||||
ShowCommand=cmd(linear,0;diffusealpha,1;sleep,2;linear,0;diffusealpha,0);
|
||||
OnCommand=cmd(sleep,12.7;queuecommand,"Show");
|
||||
};
|
||||
LoadActor("_howtoplay tap")..{
|
||||
InitCommand=cmd(diffusealpha,0);
|
||||
ShowCommand=cmd(linear,0;diffusealpha,1;sleep,2;linear,0;diffusealpha,0);
|
||||
OnCommand=cmd(sleep,15.7;queuecommand,"Show");
|
||||
};
|
||||
LoadActor("_howtoplay jump")..{
|
||||
InitCommand=cmd(diffusealpha,0);
|
||||
ShowCommand=cmd(linear,0;diffusealpha,1;sleep,2;linear,0;diffusealpha,0);
|
||||
OnCommand=cmd(sleep,18.7;queuecommand,"Show");
|
||||
};
|
||||
LoadActor("_howtoplay miss")..{
|
||||
InitCommand=cmd(diffusealpha,0);
|
||||
ShowCommand=cmd(linear,0;diffusealpha,1;sleep,2;linear,0;diffusealpha,0);
|
||||
OnCommand=cmd(sleep,22.7;queuecommand,"Show");
|
||||
};
|
||||
};
|
||||
};
|
||||
|
Before Width: | Height: | Size: 9.7 KiB |
|
Before Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 9.6 KiB |
|
Before Width: | Height: | Size: 5.3 KiB |
@@ -1,3 +0,0 @@
|
||||
local t = LoadFallbackB();
|
||||
t[#t+1] = LoadActor( THEME:GetPathB("_Arcade","decorations") );
|
||||
return t
|
||||
@@ -1,6 +0,0 @@
|
||||
return Def.ActorFrame{
|
||||
Def.Quad{
|
||||
InitCommand=cmd(FullScreen;diffuse,color("0,0,0,1"));
|
||||
OnCommand=cmd(decelerate,0.5;diffusealpha,0);
|
||||
};
|
||||
};
|
||||
@@ -1,6 +0,0 @@
|
||||
return Def.ActorFrame{
|
||||
Def.Quad{
|
||||
InitCommand=cmd(FullScreen;diffuse,color("0,0,0,0"));
|
||||
OnCommand=cmd(accelerate,0.5;diffusealpha,1);
|
||||
};
|
||||
};
|
||||
@@ -1,6 +0,0 @@
|
||||
local t = LoadFallbackB();
|
||||
|
||||
t[#t+1] = StandardDecorationFromFileOptional("Logo","Logo");
|
||||
t[#t+1] = LoadActor( THEME:GetPathB("_Arcade","decorations") );
|
||||
|
||||
return t;
|
||||
@@ -1 +0,0 @@
|
||||
_blank
|
||||
@@ -1 +0,0 @@
|
||||
_blank
|
||||
@@ -1 +0,0 @@
|
||||
_blank
|
||||
@@ -1,5 +0,0 @@
|
||||
return Def.ActorFrame {
|
||||
Def.Quad{
|
||||
InitCommand=cmd(scaletocover,-SCREEN_WIDTH*2,SCREEN_TOP,SCREEN_WIDTH*2,SCREEN_BOTTOM;diffuse,color("0,0,0,0.5"));
|
||||
};
|
||||
};
|
||||
@@ -1,6 +0,0 @@
|
||||
local t = LoadFallbackB();
|
||||
|
||||
t[#t+1] = StandardDecorationFromFileOptional("BPMLabel","BPMLabel");
|
||||
t[#t+1] = StandardDecorationFromFileOptional("BPMDisplay","BPMDisplay");
|
||||
t[#t+1] = StandardDecorationFromFileOptional("DifficultyDisplay","DifficultyDisplay");
|
||||
return t;
|
||||
@@ -1,482 +0,0 @@
|
||||
-- Pester Kyzentun for an explanation if you need to customize this screen.
|
||||
-- Also, this might be rewritten to us a proper customizable lua menu system
|
||||
-- in the future.
|
||||
|
||||
-- Copy this file into your theme, then modify as needed to suit your theme.
|
||||
-- Each of the things on this list has a comment marking it, so you can
|
||||
-- quickly find it by searching.
|
||||
-- Things you will want to change:
|
||||
-- 1. The Numpad
|
||||
-- 2. The Cursor
|
||||
-- 3. The Menu Items
|
||||
-- 4. The Menu Values
|
||||
-- 4.1 The L/R indicators
|
||||
-- 5. The Menu Fader
|
||||
|
||||
local profile= GAMESTATE:GetEditLocalProfile()
|
||||
|
||||
local cursor_width_padding = 16
|
||||
local cursor_spacing_value = 30
|
||||
|
||||
-- 1. The Numpad
|
||||
-- This is what sets up how the numpad looks. See Scripts/04 NumPadEntry.lua
|
||||
-- for a full description of how to customize a NumPad.
|
||||
-- Note that if you provide a custom prompt actor for the NumPad, it must
|
||||
-- have a SetCommand because the NumPad is used any time the player needs to
|
||||
-- enter a number, and the prompt is updated by running its SetCommand.
|
||||
local number_entry= new_numpad_entry{
|
||||
Name= "number_entry",
|
||||
InitCommand= cmd(diffusealpha, 0; xy, _screen.cx, _screen.cy * 1.5),
|
||||
value = LoadFont("Common Large") .. {
|
||||
InitCommand=cmd(xy,0,-62),
|
||||
OnCommand=cmd(zoom,0.75;diffuse,PlayerColor(PLAYER_1);strokecolor,ColorDarkTone(PlayerColor(PLAYER_1)));
|
||||
SetCommand=function(self, param)
|
||||
self:settext(param[1])
|
||||
end,
|
||||
},
|
||||
button = LoadFont("Common Normal") ..{
|
||||
InitCommand=cmd(shadowlength,1),
|
||||
SetCommand=function(self, param)
|
||||
self:settext(param[1])
|
||||
end,
|
||||
OnCommand=cmd(diffuse,color("0.8,0.8,0.8,1");zoom,0.875),
|
||||
GainFocusCommand=cmd(finishtweening;decelerate,0.125;zoom,1;diffuse,Color.White),
|
||||
LoseFocusCommand=cmd(finishtweening;smooth,0.1;zoom,0.875;diffuse,color("0.8,0.8,0.8,1"))
|
||||
},
|
||||
button_positions = {{-cursor_spacing_value, -cursor_spacing_value}, {0, -cursor_spacing_value}, {cursor_spacing_value, -cursor_spacing_value},
|
||||
{-cursor_spacing_value, 0}, {0, 0}, {cursor_spacing_value, 0},
|
||||
{-cursor_spacing_value, cursor_spacing_value}, {0, cursor_spacing_value}, {cursor_spacing_value, cursor_spacing_value},
|
||||
{-cursor_spacing_value, cursor_spacing_value*2}, {0, cursor_spacing_value*2}, {cursor_spacing_value, cursor_spacing_value*2}},
|
||||
cursor = Def.ActorFrame {
|
||||
-- Move whole container
|
||||
MoveCommand=function(self, param)
|
||||
self:stoptweening()
|
||||
self:decelerate(0.15)
|
||||
self:xy(param[1], param[2])
|
||||
if param[3] then
|
||||
self:z(param[3])
|
||||
end
|
||||
end,
|
||||
--
|
||||
LoadActor( THEME:GetPathG("_frame", "1D"),
|
||||
{ 2/18, 14/18, 2/18 },
|
||||
LoadActor(THEME:GetPathB("_frame", "cursors/rounded fill"))
|
||||
) .. {
|
||||
OnCommand=cmd(diffuse,PlayerDarkColor(PLAYER_1)),
|
||||
FitCommand=function(self, param)
|
||||
self:playcommand("SetSize",{ Width=param:GetWidth()+cursor_width_padding, tween=cmd(decelerate,0.125)})
|
||||
end,
|
||||
},
|
||||
LoadActor( THEME:GetPathG("_frame", "1D"),
|
||||
{ 2/18, 14/18, 2/18 },
|
||||
LoadActor(THEME:GetPathB("_frame", "cursors/rounded gloss"))
|
||||
) .. {
|
||||
OnCommand=cmd(diffuse,PlayerColor(PLAYER_1)),
|
||||
FitCommand=function(self, param)
|
||||
self:playcommand("SetSize",{ Width=param:GetWidth()+cursor_width_padding, tween=cmd(decelerate,0.125)})
|
||||
end,
|
||||
}
|
||||
},
|
||||
cursor_draw= "first",
|
||||
prompt = LoadFont("Common Bold") .. {
|
||||
Name="prompt",
|
||||
InitCommand=cmd(xy,0,-96);
|
||||
OnCommand=cmd(shadowlength,1;skewx,-0.125;diffusebottomedge,color("#DDDDDD");strokecolor,Color.Outline);
|
||||
SetCommand= function(self, params)
|
||||
self:settext(params[1])
|
||||
end
|
||||
},
|
||||
LoadActor(THEME:GetPathB("_frame","3x3"),"rounded black", 128, 192) .. {
|
||||
InitCommand=cmd(xy, 0, -20)
|
||||
}
|
||||
}
|
||||
|
||||
local function calc_list_pos(value, list)
|
||||
for i, entry in ipairs(list) do
|
||||
if entry.setting == value then
|
||||
return i
|
||||
end
|
||||
end
|
||||
return 1
|
||||
end
|
||||
|
||||
local function item_value_to_text(item, value)
|
||||
if item.item_type == "bool" then
|
||||
if value then
|
||||
value= THEME:GetString("ScreenOptionsCustomizeProfile", item.true_text)
|
||||
else
|
||||
value= THEME:GetString("ScreenOptionsCustomizeProfile", item.false_text)
|
||||
end
|
||||
elseif item.item_type == "list" then
|
||||
local pos= calc_list_pos(value, item.list)
|
||||
return item.list[pos].display_name
|
||||
end
|
||||
return value
|
||||
end
|
||||
|
||||
local char_list= {}
|
||||
do
|
||||
local all_chars= CHARMAN:GetAllCharacters()
|
||||
for i, char in ipairs(char_list) do
|
||||
char_list[#char_list+1]= {
|
||||
setting= char:GetCharacterID(), display_name= char:GetDisplayName()}
|
||||
end
|
||||
end
|
||||
|
||||
-- Uncomment this section if you need to test the behavior of actors in the
|
||||
-- character list but don't have any duncing characters to test with.
|
||||
--[=[
|
||||
|
||||
local fake_profile_mt= {__index= {}}
|
||||
local val_list= {}
|
||||
local function get_set_pair(name, default)
|
||||
fake_profile_mt.__index["Get"..name]= function(self)
|
||||
return self[name]
|
||||
end
|
||||
fake_profile_mt.__index["Set"..name]= function(self, val)
|
||||
self[name]= val
|
||||
end
|
||||
val_list[#val_list+1]= {name, default}
|
||||
end
|
||||
get_set_pair("WeightPounds", 0)
|
||||
get_set_pair("Voomax", 0)
|
||||
get_set_pair("BirthYear", 0)
|
||||
get_set_pair("IgnoreStepCountCalories", false)
|
||||
get_set_pair("IsMale", true)
|
||||
get_set_pair("Character", "dietlinde")
|
||||
fake_profile_mt.__index.init= function(self)
|
||||
for i, vald in ipairs(val_list) do
|
||||
self[vald[1]]= vald[2]
|
||||
end
|
||||
end
|
||||
|
||||
profile= setmetatable({}, fake_profile_mt)
|
||||
profile:init()
|
||||
|
||||
char_list= {
|
||||
{setting= "shake", display_name= "soda"},
|
||||
{setting= "freem", display_name= "inc"},
|
||||
{setting= "midi", display_name= "man"},
|
||||
{setting= "kyz", display_name= "zentun"},
|
||||
{setting= "mad", display_name= "matt"},
|
||||
{setting= "db", display_name= "k2"},
|
||||
}
|
||||
]=]
|
||||
|
||||
local menu_items= {
|
||||
{name= "weight", get= "GetWeightPounds", set= "SetWeightPounds",
|
||||
item_type= "number", auto_done= 100},
|
||||
{name= "voomax", get= "GetVoomax", set= "SetVoomax", item_type= "number",
|
||||
auto_done= 10},
|
||||
{name= "birth_year", get= "GetBirthYear", set= "SetBirthYear",
|
||||
item_type= "number", auto_done= 1000},
|
||||
{name= "calorie_calc", get= "GetIgnoreStepCountCalories",
|
||||
set= "SetIgnoreStepCountCalories", item_type= "bool",
|
||||
true_text= "use_heart", false_text= "use_steps"},
|
||||
{name= "gender", get= "GetIsMale", set= "SetIsMale", item_type= "bool",
|
||||
true_text= "male", false_text= "female"},
|
||||
}
|
||||
if #char_list > 0 then
|
||||
menu_items[#menu_items+1]= {
|
||||
name= "character", get= "GetCharacter", set= "SetCharacter",
|
||||
item_type= "list", list= char_list}
|
||||
end
|
||||
menu_items[#menu_items+1]= {name= "exit", item_type= "exit"}
|
||||
|
||||
local menu_cursor
|
||||
local menu_pos= 1
|
||||
local menu_start= SCREEN_TOP + 80
|
||||
if #menu_items > 6 then
|
||||
menu_start= SCREEN_TOP + 68
|
||||
end
|
||||
local menu_x= SCREEN_CENTER_X * 0.25
|
||||
local value_x= ( SCREEN_CENTER_X * 0.25 ) + 256
|
||||
local fader
|
||||
local cursor_on_menu= "main"
|
||||
local menu_item_actors= {}
|
||||
local menu_values= {}
|
||||
local list_pos= 0
|
||||
local active_list= {}
|
||||
local left_showing= false
|
||||
local right_showing= false
|
||||
|
||||
local function fade_actor_to(actor, alf)
|
||||
actor:stoptweening()
|
||||
actor:smooth(.15)
|
||||
actor:diffusealpha(alf)
|
||||
end
|
||||
|
||||
local function update_menu_cursor()
|
||||
local item= menu_item_actors[menu_pos]
|
||||
menu_cursor:playcommand("Move", {item:GetX(), item:GetY()})
|
||||
menu_cursor:playcommand("Fit", item)
|
||||
end
|
||||
|
||||
local function update_list_cursor()
|
||||
local valactor= menu_values[menu_pos]
|
||||
valactor:playcommand("Set", {active_list[list_pos].display_name})
|
||||
if list_pos > 1 then
|
||||
if not left_showing then
|
||||
valactor:playcommand("ShowLeft")
|
||||
left_showing= true
|
||||
end
|
||||
else
|
||||
if left_showing then
|
||||
valactor:playcommand("HideLeft")
|
||||
left_showing= false
|
||||
end
|
||||
end
|
||||
if list_pos < #active_list then
|
||||
if not right_showing then
|
||||
valactor:playcommand("ShowRight")
|
||||
right_showing= true
|
||||
end
|
||||
else
|
||||
if right_showing then
|
||||
valactor:playcommand("HideRight")
|
||||
right_showing= false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function exit_screen()
|
||||
local profile_id= GAMESTATE:GetEditLocalProfileID()
|
||||
PROFILEMAN:SaveLocalProfile(profile_id)
|
||||
SCREENMAN:GetTopScreen():StartTransitioningScreen("SM_GoToNextScreen")
|
||||
SOUND:PlayOnce(THEME:GetPathS("Common", "Start"), true)
|
||||
end
|
||||
|
||||
local function input(event)
|
||||
local pn= event.PlayerNumber
|
||||
if not pn then return false end
|
||||
if event.type == "InputEventType_Release" then return false end
|
||||
local button= event.GameButton
|
||||
if cursor_on_menu == "main" then
|
||||
if button == "Start" then
|
||||
local item= menu_items[menu_pos]
|
||||
if item.item_type == "bool" then
|
||||
local value= not profile[item.get](profile)
|
||||
menu_values[menu_pos]:playcommand(
|
||||
"Set", {item_value_to_text(item, value)})
|
||||
profile[item.set](profile, value)
|
||||
elseif item.item_type == "number" then
|
||||
--fade_actor_to(fader, .8)
|
||||
fade_actor_to(number_entry.container, 1)
|
||||
number_entry.value= profile[item.get](profile)
|
||||
number_entry.value_actor:playcommand("Set", {number_entry.value})
|
||||
number_entry.auto_done_value= item.auto_done
|
||||
number_entry.max_value= item.max
|
||||
number_entry:update_cursor(number_entry.cursor_start)
|
||||
number_entry.prompt_actor:playcommand(
|
||||
"Set", {THEME:GetString("ScreenOptionsCustomizeProfile", item.name)})
|
||||
cursor_on_menu= "numpad"
|
||||
elseif item.item_type == "list" then
|
||||
cursor_on_menu= "list"
|
||||
active_list= menu_items[menu_pos].list
|
||||
list_pos= calc_list_pos(
|
||||
profile[menu_items[menu_pos].get](profile), active_list)
|
||||
update_list_cursor()
|
||||
elseif item.item_type == "exit" then
|
||||
exit_screen()
|
||||
end
|
||||
elseif button == "Back" then
|
||||
exit_screen()
|
||||
else
|
||||
if button == "MenuLeft" or button == "MenuUp" then
|
||||
if menu_pos > 1 then menu_pos= menu_pos - 1 end
|
||||
update_menu_cursor()
|
||||
elseif button == "MenuRight" or button == "MenuDown" then
|
||||
if menu_pos < #menu_items then menu_pos= menu_pos + 1 end
|
||||
update_menu_cursor()
|
||||
end
|
||||
end
|
||||
elseif cursor_on_menu == "numpad" then
|
||||
local done= number_entry:handle_input(button)
|
||||
if done or button == "Back" then
|
||||
local item= menu_items[menu_pos]
|
||||
if button ~= "Back" then
|
||||
profile[item.set](profile, number_entry.value)
|
||||
menu_values[menu_pos]:playcommand(
|
||||
"Set", {item_value_to_text(item, number_entry.value)})
|
||||
end
|
||||
--fade_actor_to(fader, 0)
|
||||
fade_actor_to(number_entry.container, 0)
|
||||
cursor_on_menu= "main"
|
||||
end
|
||||
elseif cursor_on_menu == "list" then
|
||||
if button == "MenuLeft" or button == "MenuUp" then
|
||||
if list_pos > 1 then list_pos= list_pos - 1 end
|
||||
update_list_cursor()
|
||||
menu_values[menu_pos]:playcommand("PressLeft")
|
||||
elseif button == "MenuRight" or button == "MenuDown" then
|
||||
if list_pos < #active_list then list_pos= list_pos + 1 end
|
||||
update_list_cursor()
|
||||
menu_values[menu_pos]:playcommand("PressRight")
|
||||
elseif button == "Start" or button == "Back" then
|
||||
if button ~= "Back" then
|
||||
profile[menu_items[menu_pos].set](
|
||||
profile, active_list[list_pos].setting)
|
||||
end
|
||||
local valactor= menu_values[menu_pos]
|
||||
left_showing= false
|
||||
right_showing= false
|
||||
valactor:playcommand("HideLeft")
|
||||
valactor:playcommand("HideRight")
|
||||
cursor_on_menu= "main"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local args= {
|
||||
Def.Actor{
|
||||
OnCommand= function(self)
|
||||
update_menu_cursor()
|
||||
SCREENMAN:GetTopScreen():AddInputCallback(input)
|
||||
end
|
||||
},
|
||||
-- 2. The Cursor
|
||||
-- This is the cursor on the main portion of the menu.
|
||||
-- It needs to have Move and Fit commands for when it's moved to a new
|
||||
-- item on the list.
|
||||
Def.ActorFrame {
|
||||
Name= "menu_cursor", InitCommand= function(self)
|
||||
menu_cursor= self
|
||||
end,
|
||||
-- Move whole container
|
||||
MoveCommand=function(self, param)
|
||||
self:stoptweening()
|
||||
self:decelerate(0.15)
|
||||
self:xy(param[1], param[2])
|
||||
if param[3] then
|
||||
self:z(param[3])
|
||||
end
|
||||
end,
|
||||
FitCommand= function(self, param)
|
||||
self:addx(param:GetWidth()/2)
|
||||
end,
|
||||
--
|
||||
LoadActor( THEME:GetPathG("_frame", "1D"),
|
||||
{ 2/18, 14/18, 2/18 },
|
||||
LoadActor(THEME:GetPathB("_frame", "cursors/rounded fill"))
|
||||
) .. {
|
||||
OnCommand=cmd(diffuse,PlayerDarkColor(PLAYER_1)),
|
||||
FitCommand=function(self, param)
|
||||
self:playcommand("SetSize",{ Width=param:GetWidth()+cursor_width_padding, tween=cmd(stoptweening;decelerate,0.15)})
|
||||
end,
|
||||
},
|
||||
LoadActor( THEME:GetPathG("_frame", "1D"),
|
||||
{ 2/18, 14/18, 2/18 },
|
||||
LoadActor(THEME:GetPathB("_frame", "cursors/rounded gloss"))
|
||||
) .. {
|
||||
OnCommand=cmd(diffuse,PlayerColor(PLAYER_1)),
|
||||
FitCommand=function(self, param)
|
||||
self:playcommand("SetSize",{ Width=param:GetWidth()+cursor_width_padding, tween=cmd(stoptweening;decelerate,0.15)})
|
||||
end,
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
-- Note that the "character" item in the menu only shows up if there are
|
||||
-- characters to choose from. You might want to adjust positioning for that.
|
||||
for i, item in ipairs(menu_items) do
|
||||
local item_y= menu_start + ((i-1) * 24)
|
||||
-- 3. The Menu Items
|
||||
-- This creates the actor that will be used to show each item on the menu.
|
||||
args[#args+1]= Def.BitmapText{
|
||||
Name= "menu_" .. item.name, Font= "Common Normal",
|
||||
Text= THEME:GetString("ScreenOptionsCustomizeProfile", item.name),
|
||||
InitCommand= function(self)
|
||||
-- Note that the item adds itself to the list menu_item_actors. This
|
||||
-- is so that when the cursor is moved, the appropriate item can be
|
||||
-- easily fetched for positioning and sizing the cursor.
|
||||
-- Note the ActorFrames have a width of 1 unless you set it, so when
|
||||
-- you change this from an BitmapText to a ActorFrame, you will have
|
||||
-- to make the FitCommand of your cursor look at the children.
|
||||
menu_item_actors[i]= self
|
||||
self:xy(menu_x, item_y)
|
||||
self:diffuse(Color.White)
|
||||
self:horizalign(left)
|
||||
end
|
||||
}
|
||||
if item.get then
|
||||
local value_text= item_value_to_text(item, profile[item.get](profile))
|
||||
-- 4. The Menu Values
|
||||
-- Each of the values needs to have a SetCommand so it can be updated
|
||||
-- when the player changes it.
|
||||
-- And ActorFrame is used because values for list items need to have
|
||||
-- left/right indicators for when the player is making a choice.
|
||||
local value_args= {
|
||||
Name= "value_" .. item.name,
|
||||
InitCommand= function(self)
|
||||
-- Note that the ActorFrame is being added to the list menu_values
|
||||
-- so it can be easily fetched and updated when the value changes.
|
||||
menu_values[i]= self
|
||||
self:xy(value_x, menu_start + ((i-1) * 24))
|
||||
end,
|
||||
Def.BitmapText{
|
||||
Name= "val", Font= "Common Normal", Text= value_text,
|
||||
InitCommand= function(self)
|
||||
self:diffuse(Color.White)
|
||||
self:horizalign(left)
|
||||
end,
|
||||
SetCommand= function(self, param)
|
||||
self:settext(param[1])
|
||||
end,
|
||||
}
|
||||
}
|
||||
if item.item_type == "list" then
|
||||
-- 4.1 The L/R indicators
|
||||
-- The L/R indicators are there to tell the player when there is a
|
||||
-- choice to the left or right of the choice they are on.
|
||||
-- Note that they are placed inside the ActorFrame for the value, so
|
||||
-- when commands are played on the ActorFrame, they are played for the
|
||||
-- indicators too.
|
||||
-- The commands are ShowLeft, HideLeft, PressLeft, and the same for
|
||||
-- Right.
|
||||
-- Note that the right indicator has a SetCommand so it sees when the
|
||||
-- value changes and checks the new width to position itself.
|
||||
-- Show/Hide is only played when the indicator changes state.
|
||||
-- Command execution order: Set, Show/Hide (if change occurred), Press
|
||||
value_args[#value_args+1]= LoadActor(THEME:GetPathG("_StepsDisplayListRow","arrow")) .. {
|
||||
InitCommand= function(self)
|
||||
self:rotationy(-180)
|
||||
self:x(-8)
|
||||
self:visible(false)
|
||||
self:playcommand("Set", {value_text})
|
||||
end,
|
||||
ShowLeftCommand= cmd(visible, true),
|
||||
HideLeftCommand= cmd(visible, false),
|
||||
PressLeftCommand= cmd(finishtweening;zoom,1.5;smooth,0.25;zoom,1),
|
||||
}
|
||||
value_args[#value_args+1]= LoadActor(THEME:GetPathG("_StepsDisplayListRow","arrow")) .. {
|
||||
InitCommand= function(self)
|
||||
self:visible(false)
|
||||
self:playcommand("Set", {value_text})
|
||||
end,
|
||||
SetCommand= function(self)
|
||||
local valw= self:GetParent():GetChild("val"):GetWidth()
|
||||
self:x(valw+8)
|
||||
end,
|
||||
ShowRightCommand= cmd(visible, true),
|
||||
HideRightCommand= cmd(visible, false),
|
||||
PressRightCommand= cmd(finishtweening;zoom,1.5;smooth,0.25;zoom,1),
|
||||
}
|
||||
end
|
||||
args[#args+1]= Def.ActorFrame(value_args)
|
||||
end
|
||||
end
|
||||
|
||||
local _height = (#menu_items) * 24
|
||||
args[#args+1]= LoadActor(THEME:GetPathB("_frame", "3x3"),"rounded black",474,_height) .. {
|
||||
Name= "fader", InitCommand= function(self)
|
||||
fader= self
|
||||
self:draworder(-20)
|
||||
self:xy(menu_x + 474/2, menu_start + _height/2 - 12)
|
||||
self:diffuse(Color.Black)
|
||||
self:diffusealpha(0.75)
|
||||
end
|
||||
}
|
||||
|
||||
args[#args+1]= number_entry:create_actors()
|
||||
|
||||
return Def.ActorFrame(args)
|
||||
@@ -1,5 +0,0 @@
|
||||
return Def.Actor{
|
||||
StartTransitioningCommand=function(self)
|
||||
ThemePrefs.Save()
|
||||
end
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
local t = Def.ActorFrame {};
|
||||
|
||||
t[#t+1] = Def.ActorFrame {
|
||||
Def.Sprite {
|
||||
Condition=not GAMESTATE:IsCourseMode();
|
||||
InitCommand=cmd(Center);
|
||||
OnCommand=function(self)
|
||||
if GAMESTATE:GetCurrentSong() then
|
||||
local song = GAMESTATE:GetCurrentSong();
|
||||
if song:HasBackground() then
|
||||
self:LoadBackground(song:GetBackgroundPath());
|
||||
end;
|
||||
self:scale_or_crop_background();
|
||||
(cmd(fadebottom,0.25;fadetop,0.25;croptop,48/480;cropbottom,48/480))(self);
|
||||
else
|
||||
self:visible(false);
|
||||
end
|
||||
end;
|
||||
};
|
||||
Def.Quad {
|
||||
InitCommand=cmd(Center;scaletoclipped,SCREEN_WIDTH+1,SCREEN_HEIGHT);
|
||||
OnCommand=cmd(diffuse,color("#FFCB05");diffusebottomedge,color("#F0BA00");diffusealpha,0.45);
|
||||
};
|
||||
LoadActor(THEME:GetPathB("ScreenWithMenuElements","background/_bg top")) .. {
|
||||
InitCommand=cmd(Center;scaletoclipped,SCREEN_WIDTH+1,SCREEN_HEIGHT);
|
||||
OnCommand=cmd(diffusealpha,0.5);
|
||||
};
|
||||
};
|
||||
return t
|
||||
@@ -1,15 +0,0 @@
|
||||
local num_players = GAMESTATE:GetHumanPlayers();
|
||||
|
||||
local t = LoadFallbackB();
|
||||
|
||||
for i=1,#num_players do
|
||||
local metrics_name = "PlayerNameplate" .. ToEnumShortString(num_players[i])
|
||||
t[#t+1] = LoadActor( THEME:GetPathG(Var "LoadingScreen", "PlayerNameplate"), num_players[i] ) .. {
|
||||
InitCommand=function(self)
|
||||
self:name(metrics_name);
|
||||
ActorUtil.LoadAllCommandsAndSetXY(self,Var "LoadingScreen");
|
||||
end
|
||||
}
|
||||
end
|
||||
|
||||
return t;
|
||||
@@ -1,39 +0,0 @@
|
||||
if PREFSMAN:GetPreference( "ShowSongOptions" ) ~= "Maybe_Ask" then
|
||||
return LoadActor( THEME:GetPathB("Screen", "out") );
|
||||
end
|
||||
|
||||
local t = Def.ActorFrame {
|
||||
LoadActor( THEME:GetPathB("Screen", "out") );
|
||||
|
||||
LoadFont( "common normal" ) .. {
|
||||
InitCommand=cmd(settext,"Press &START; for more options";x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y+100;visible,false);
|
||||
AskForGoToOptionsCommand=cmd(
|
||||
visible,true;
|
||||
diffusealpha,0;
|
||||
linear,0.15;
|
||||
zoomy,1;
|
||||
diffusealpha,1;
|
||||
sleep,1;
|
||||
linear,0.15;
|
||||
diffusealpha,0;
|
||||
zoomy,0;
|
||||
);
|
||||
GoToOptionsCommand=cmd(visible,false);
|
||||
};
|
||||
LoadFont( "common normal" ) .. {
|
||||
InitCommand=cmd(settext,"entering options...";x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y+100;visible,false);
|
||||
AskForGoToOptionsCommand=cmd(
|
||||
visible,false;
|
||||
linear,0.15;
|
||||
zoomy,1;
|
||||
diffusealpha,1;
|
||||
sleep,1;
|
||||
linear,0.15;
|
||||
diffusealpha,0;
|
||||
zoomy,0;
|
||||
);
|
||||
GoToOptionsCommand=cmd(visible,true);
|
||||
};
|
||||
};
|
||||
|
||||
return t;
|
||||
@@ -1 +0,0 @@
|
||||
ScreenMiniMenu underlay
|
||||
@@ -1,11 +0,0 @@
|
||||
local t = LoadFallbackB();
|
||||
|
||||
t[#t+1] = LoadFont("Common Normal") .. {
|
||||
Name="Explanation";
|
||||
Text=THEME:GetString(Var "LoadingScreen","Explanation");
|
||||
InitCommand=function(self)
|
||||
ActorUtil.LoadAllCommandsAndSetXY(self,Var "LoadingScreen");
|
||||
end;
|
||||
};
|
||||
|
||||
return t;
|
||||
@@ -1 +0,0 @@
|
||||
ScreenTitleMenu background
|
||||
@@ -1,299 +0,0 @@
|
||||
local t = LoadFallbackB();
|
||||
|
||||
-- Legacy StepMania 4 Function
|
||||
local function StepsDisplay(pn)
|
||||
local function set(self, player)
|
||||
self:SetFromGameState( player );
|
||||
end
|
||||
|
||||
local t = Def.StepsDisplay {
|
||||
InitCommand=cmd(Load,"StepsDisplay",GAMESTATE:GetPlayerState(pn););
|
||||
};
|
||||
|
||||
if pn == PLAYER_1 then
|
||||
t.CurrentStepsP1ChangedMessageCommand=function(self) set(self, pn); end;
|
||||
t.CurrentTrailP1ChangedMessageCommand=function(self) set(self, pn); end;
|
||||
else
|
||||
t.CurrentStepsP2ChangedMessageCommand=function(self) set(self, pn); end;
|
||||
t.CurrentTrailP2ChangedMessageCommand=function(self) set(self, pn); end;
|
||||
end
|
||||
|
||||
return t;
|
||||
end
|
||||
t[#t+1] = StandardDecorationFromFileOptional("AlternateHelpDisplay","AlternateHelpDisplay");
|
||||
|
||||
local function PercentScore(pn)
|
||||
local t = LoadFont("Common normal")..{
|
||||
InitCommand=cmd(zoom,0.625;shadowlength,1);
|
||||
BeginCommand=cmd(playcommand,"Set");
|
||||
SetCommand=function(self)
|
||||
local SongOrCourse, StepsOrTrail;
|
||||
if GAMESTATE:IsCourseMode() then
|
||||
SongOrCourse = GAMESTATE:GetCurrentCourse();
|
||||
StepsOrTrail = GAMESTATE:GetCurrentTrail(pn);
|
||||
else
|
||||
SongOrCourse = GAMESTATE:GetCurrentSong();
|
||||
StepsOrTrail = GAMESTATE:GetCurrentSteps(pn);
|
||||
end;
|
||||
|
||||
local profile, scorelist;
|
||||
local text = "";
|
||||
if SongOrCourse and StepsOrTrail then
|
||||
local st = StepsOrTrail:GetStepsType();
|
||||
local diff = StepsOrTrail:GetDifficulty();
|
||||
local courseType = GAMESTATE:IsCourseMode() and SongOrCourse:GetCourseType() or nil;
|
||||
local cd = GetCustomDifficulty(st, diff, courseType);
|
||||
self:diffuse(CustomDifficultyToColor(cd));
|
||||
self:shadowcolor(CustomDifficultyToDarkColor(cd));
|
||||
|
||||
if PROFILEMAN:IsPersistentProfile(pn) then
|
||||
-- player profile
|
||||
profile = PROFILEMAN:GetProfile(pn);
|
||||
else
|
||||
-- machine profile
|
||||
profile = PROFILEMAN:GetMachineProfile();
|
||||
end;
|
||||
|
||||
scorelist = profile:GetHighScoreList(SongOrCourse,StepsOrTrail);
|
||||
assert(scorelist)
|
||||
local scores = scorelist:GetHighScores();
|
||||
local topscore = scores[1];
|
||||
if topscore then
|
||||
text = string.format("%.2f%%", topscore:GetPercentDP()*100.0);
|
||||
-- 100% hack
|
||||
if text == "100.00%" then
|
||||
text = "100%";
|
||||
end;
|
||||
else
|
||||
text = string.format("%.2f%%", 0);
|
||||
end;
|
||||
else
|
||||
text = "";
|
||||
end;
|
||||
self:settext(text);
|
||||
end;
|
||||
CurrentSongChangedMessageCommand=cmd(playcommand,"Set");
|
||||
CurrentCourseChangedMessageCommand=cmd(playcommand,"Set");
|
||||
};
|
||||
|
||||
if pn == PLAYER_1 then
|
||||
t.CurrentStepsP1ChangedMessageCommand=cmd(playcommand,"Set");
|
||||
t.CurrentTrailP1ChangedMessageCommand=cmd(playcommand,"Set");
|
||||
else
|
||||
t.CurrentStepsP2ChangedMessageCommand=cmd(playcommand,"Set");
|
||||
t.CurrentTrailP2ChangedMessageCommand=cmd(playcommand,"Set");
|
||||
end
|
||||
|
||||
return t;
|
||||
end
|
||||
|
||||
-- Legacy StepMania 4 Function
|
||||
for pn in ivalues(PlayerNumber) do
|
||||
local MetricsName = "StepsDisplay" .. PlayerNumberToString(pn);
|
||||
t[#t+1] = StepsDisplay(pn) .. {
|
||||
InitCommand=function(self) self:player(pn); self:name(MetricsName); ActorUtil.LoadAllCommandsAndSetXY(self,Var "LoadingScreen"); end;
|
||||
PlayerJoinedMessageCommand=function(self, params)
|
||||
if params.Player == pn then
|
||||
self:visible(true);
|
||||
(cmd(zoom,0;bounceend,0.3;zoom,1))(self);
|
||||
end;
|
||||
end;
|
||||
PlayerUnjoinedMessageCommand=function(self, params)
|
||||
if params.Player == pn then
|
||||
self:visible(true);
|
||||
(cmd(bouncebegin,0.3;zoom,0))(self);
|
||||
end;
|
||||
end;
|
||||
};
|
||||
if ShowStandardDecoration("PercentScore"..ToEnumShortString(pn)) then
|
||||
t[#t+1] = StandardDecorationFromTable("PercentScore"..ToEnumShortString(pn), PercentScore(pn));
|
||||
end;
|
||||
end
|
||||
|
||||
t[#t+1] = StandardDecorationFromFileOptional("BannerFrame","BannerFrame");
|
||||
t[#t+1] = StandardDecorationFromFileOptional("PaneDisplayFrameP1","PaneDisplayFrame");
|
||||
t[#t+1] = StandardDecorationFromFileOptional("PaneDisplayFrameP2","PaneDisplayFrame");
|
||||
t[#t+1] = StandardDecorationFromFileOptional("PaneDisplayTextP1","PaneDisplayTextP1");
|
||||
t[#t+1] = StandardDecorationFromFileOptional("PaneDisplayTextP2","PaneDisplayTextP2");
|
||||
t[#t+1] = StandardDecorationFromFileOptional("DifficultyList","DifficultyList");
|
||||
|
||||
t[#t+1] = StandardDecorationFromFileOptional("BPMDisplay","BPMDisplay");
|
||||
t[#t+1] = StandardDecorationFromFileOptional("BPMLabel","BPMLabel");
|
||||
t[#t+1] = StandardDecorationFromFileOptional("SegmentDisplay","SegmentDisplay");
|
||||
--[[ t[#t+1] = StandardDecorationFromFileOptional("NegativeDisplay","NegativeDisplay") .. {
|
||||
}; --]]
|
||||
|
||||
t[#t+1] = StandardDecorationFromFileOptional("SongTime","SongTime") .. {
|
||||
SetCommand=function(self)
|
||||
local curSelection = nil;
|
||||
local length = 0.0;
|
||||
if GAMESTATE:IsCourseMode() then
|
||||
curSelection = GAMESTATE:GetCurrentCourse();
|
||||
self:playcommand("Reset");
|
||||
if curSelection then
|
||||
local trail = GAMESTATE:GetCurrentTrail(GAMESTATE:GetMasterPlayerNumber());
|
||||
if trail then
|
||||
length = TrailUtil.GetTotalSeconds(trail);
|
||||
else
|
||||
length = 0.0;
|
||||
end;
|
||||
else
|
||||
length = 0.0;
|
||||
end;
|
||||
else
|
||||
curSelection = GAMESTATE:GetCurrentSong();
|
||||
self:playcommand("Reset");
|
||||
if curSelection then
|
||||
length = curSelection:MusicLengthSeconds();
|
||||
if curSelection:IsLong() then
|
||||
self:playcommand("Long");
|
||||
elseif curSelection:IsMarathon() then
|
||||
self:playcommand("Marathon");
|
||||
else
|
||||
self:playcommand("Reset");
|
||||
end
|
||||
else
|
||||
length = 0.0;
|
||||
self:playcommand("Reset");
|
||||
end;
|
||||
end;
|
||||
self:settext( SecondsToMSS(length) );
|
||||
end;
|
||||
CurrentSongChangedMessageCommand=cmd(playcommand,"Set");
|
||||
CurrentCourseChangedMessageCommand=cmd(playcommand,"Set");
|
||||
CurrentTrailP1ChangedMessageCommand=cmd(playcommand,"Set");
|
||||
CurrentTrailP2ChangedMessageCommand=cmd(playcommand,"Set");
|
||||
}
|
||||
|
||||
if not GAMESTATE:IsCourseMode() then
|
||||
local function CDTitleUpdate(self)
|
||||
local song = GAMESTATE:GetCurrentSong();
|
||||
local cdtitle = self:GetChild("CDTitle");
|
||||
local height = cdtitle:GetHeight();
|
||||
|
||||
if song then
|
||||
if song:HasCDTitle() then
|
||||
cdtitle:visible(true);
|
||||
cdtitle:Load(song:GetCDTitlePath());
|
||||
else
|
||||
cdtitle:visible(false);
|
||||
end;
|
||||
else
|
||||
cdtitle:visible(false);
|
||||
end;
|
||||
|
||||
self:zoom(scale(height,32,480,1,32/480))
|
||||
end;
|
||||
t[#t+1] = Def.ActorFrame {
|
||||
OnCommand=cmd(draworder,105;x,SCREEN_CENTER_X-256;y,SCREEN_CENTER_Y-84;zoom,0;sleep,0.5;decelerate,0.25;zoom,1;SetUpdateFunction,CDTitleUpdate);
|
||||
OffCommand=cmd(bouncebegin,0.15;zoomx,0);
|
||||
Def.Sprite {
|
||||
Name="CDTitle";
|
||||
OnCommand=cmd(draworder,106;shadowlength,1;zoom,0.75;diffusealpha,1;zoom,0;bounceend,0.35;zoom,0.75;spin;effectperiod,2;effectmagnitude,0,180,0);
|
||||
BackCullCommand=cmd(diffuse,color("0.5,0.5,0.5,1"));
|
||||
};
|
||||
};
|
||||
t[#t+1] = StandardDecorationFromFileOptional("NewSong","NewSong") .. {
|
||||
-- ShowCommand=THEME:GetMetric(Var "LoadingScreen", "NewSongShowCommand" );
|
||||
-- HideCommand=THEME:GetMetric(Var "LoadingScreen", "NewSongHideCommand" );
|
||||
InitCommand=cmd(playcommand,"Set");
|
||||
BeginCommand=cmd(playcommand,"Set");
|
||||
CurrentSongChangedMessageCommand=cmd(playcommand,"Set");
|
||||
SetCommand=function(self)
|
||||
-- local pTargetProfile;
|
||||
local sSong;
|
||||
-- Start!
|
||||
if GAMESTATE:GetCurrentSong() then
|
||||
if PROFILEMAN:IsSongNew(GAMESTATE:GetCurrentSong()) then
|
||||
self:playcommand("Show");
|
||||
else
|
||||
self:playcommand("Hide");
|
||||
end
|
||||
else
|
||||
self:playcommand("Hide");
|
||||
end
|
||||
end;
|
||||
};
|
||||
t[#t+1] = StandardDecorationFromFileOptional("StageDisplay","StageDisplay");
|
||||
end;
|
||||
|
||||
if GAMESTATE:IsCourseMode() then
|
||||
t[#t+1] = Def.ActorFrame {
|
||||
Def.Quad {
|
||||
InitCommand=cmd(
|
||||
x,THEME:GetMetric(Var "LoadingScreen","CourseContentsListX");
|
||||
y,THEME:GetMetric(Var "LoadingScreen","CourseContentsListY") - 118;
|
||||
zoomto,256+32,192;
|
||||
);
|
||||
OnCommand=cmd(diffuse,Color.Green;MaskSource);
|
||||
};
|
||||
Def.Quad {
|
||||
InitCommand=cmd(
|
||||
x,THEME:GetMetric(Var "LoadingScreen","CourseContentsListX");
|
||||
y,THEME:GetMetric(Var "LoadingScreen","CourseContentsListY") + 186;
|
||||
zoomto,256+32,64;
|
||||
);
|
||||
OnCommand=cmd(diffuse,Color.Blue;MaskSource);
|
||||
};
|
||||
};
|
||||
t[#t+1] = StandardDecorationFromFileOptional("CourseContentsList","CourseContentsList");
|
||||
t[#t+1] = StandardDecorationFromFileOptional("NumCourseSongs","NumCourseSongs")..{
|
||||
InitCommand=cmd(horizalign,right);
|
||||
SetCommand=function(self)
|
||||
local curSelection= nil;
|
||||
local sAppend = "";
|
||||
if GAMESTATE:IsCourseMode() then
|
||||
curSelection = GAMESTATE:GetCurrentCourse();
|
||||
if curSelection then
|
||||
sAppend = (curSelection:GetEstimatedNumStages() == 1) and "Stage" or "Stages";
|
||||
self:visible(true);
|
||||
self:settext( curSelection:GetEstimatedNumStages() .. " " .. sAppend);
|
||||
else
|
||||
self:visible(false);
|
||||
end;
|
||||
else
|
||||
self:visible(false);
|
||||
end;
|
||||
end;
|
||||
CurrentCourseChangedMessageCommand=cmd(playcommand,"Set");
|
||||
};
|
||||
end
|
||||
|
||||
t[#t+1] = StandardDecorationFromFileOptional("DifficultyDisplay","DifficultyDisplay");
|
||||
|
||||
t[#t+1] = StandardDecorationFromFileOptional("SortOrder","SortOrderText") .. {
|
||||
BeginCommand=cmd(playcommand,"Set");
|
||||
SortOrderChangedMessageCommand=cmd(playcommand,"Set");
|
||||
SetCommand=function(self)
|
||||
local s = GAMESTATE:GetSortOrder()
|
||||
if s ~= nil then
|
||||
local s = SortOrderToLocalizedString( s )
|
||||
self:settext( s )
|
||||
self:playcommand("Sort")
|
||||
else
|
||||
return
|
||||
end
|
||||
end;
|
||||
};
|
||||
|
||||
t[#t+1] = StandardDecorationFromFileOptional("SongOptionsFrame","SongOptionsFrame") .. {
|
||||
ShowPressStartForOptionsCommand=THEME:GetMetric(Var "LoadingScreen","SongOptionsFrameShowCommand");
|
||||
ShowEnteringOptionsCommand=THEME:GetMetric(Var "LoadingScreen","SongOptionsFrameEnterCommand");
|
||||
HidePressStartForOptionsCommand=THEME:GetMetric(Var "LoadingScreen","SongOptionsFrameHideCommand");
|
||||
};
|
||||
t[#t+1] = StandardDecorationFromFileOptional("SongOptions","SongOptionsText") .. {
|
||||
ShowPressStartForOptionsCommand=THEME:GetMetric(Var "LoadingScreen","SongOptionsShowCommand");
|
||||
ShowEnteringOptionsCommand=THEME:GetMetric(Var "LoadingScreen","SongOptionsEnterCommand");
|
||||
HidePressStartForOptionsCommand=THEME:GetMetric(Var "LoadingScreen","SongOptionsHideCommand");
|
||||
};
|
||||
-- Sounds
|
||||
t[#t+1] = Def.ActorFrame {
|
||||
LoadActor(THEME:GetPathS("_switch","up")) .. {
|
||||
SelectMenuOpenedMessageCommand=cmd(stop;play);
|
||||
};
|
||||
LoadActor(THEME:GetPathS("_switch","down")) .. {
|
||||
SelectMenuClosedMessageCommand=cmd(stop;play);
|
||||
};
|
||||
};
|
||||
|
||||
return t
|
||||
@@ -1,70 +0,0 @@
|
||||
local num_players = GAMESTATE:GetHumanPlayers();
|
||||
local function PositionItem(i,max)
|
||||
local x_spacing = 128;
|
||||
return x_spacing * (i-(max-1)/2);
|
||||
end
|
||||
|
||||
|
||||
local t = Def.ActorFrame {
|
||||
FOV=90;
|
||||
--
|
||||
Def.Quad {
|
||||
InitCommand=cmd(zoomto,SCREEN_CENTER_X+80,SCREEN_HEIGHT);
|
||||
OnCommand=cmd(diffuse,Color.Black;diffusealpha,0.75;fadeleft,32/SCREEN_CENTER_X;faderight,32/SCREEN_CENTER_X);
|
||||
};
|
||||
};
|
||||
--
|
||||
for i=1,#num_players do
|
||||
local f = Def.ActorFrame {
|
||||
InitCommand=cmd(x,-128+PositionItem(i,#num_players));
|
||||
UnchosenCommand=cmd(finishtweening;bounceend,0.25;zoom,1);
|
||||
ChosenCommand=cmd(stoptweening;bouncebegin,0.3;zoom,0);
|
||||
--
|
||||
StepsChosenMessageCommand=function( self, param )
|
||||
if param.Player ~= num_players[i] then return end;
|
||||
self:playcommand("Chosen");
|
||||
end;
|
||||
StepsUnchosenMessageCommand=function( self, param )
|
||||
if param.Player ~= num_players[i] then return end;
|
||||
self:playcommand("Unchosen");
|
||||
end;
|
||||
Def.Quad {
|
||||
InitCommand=cmd(y,-35);
|
||||
OnCommand=cmd(diffuse,PlayerColor(num_players[i]);shadowlength,1;linear,0.25;zoomtowidth,80;fadeleft,0.5;faderight,0.5);
|
||||
};
|
||||
LoadFont("Common Bold") .. {
|
||||
Text=ToEnumShortString(num_players[i]);
|
||||
InitCommand=cmd(y,-48);
|
||||
OnCommand=cmd(shadowlength,1;diffuse,PlayerColor(num_players[i]));
|
||||
};
|
||||
LoadFont("Common Bold") .. {
|
||||
Text="PRESS";
|
||||
InitCommand=cmd(y,-20);
|
||||
OnCommand=cmd(shadowlength,1;pulse;effectmagnitude,1,1.125,1;effectperiod,0.5);
|
||||
};
|
||||
LoadFont("Common Normal") .. {
|
||||
Text="TO START";
|
||||
InitCommand=cmd(y,58);
|
||||
OnCommand=cmd(shadowlength,1;zoom,0.75);
|
||||
};
|
||||
};
|
||||
if GAMESTATE:GetCurrentGame():GetName() == "pump" then
|
||||
local ns = num_players[i] == PLAYER_1 and RoutineSkinP1() or RoutineSkinP2()
|
||||
f[#f+1] = LoadActor( NOTESKIN:GetPathForNoteSkin("Center","Tap",ns) ) .. {
|
||||
InitCommand=cmd(y,20);
|
||||
}
|
||||
end
|
||||
t[#t+1] = f;
|
||||
end
|
||||
-- Lock input for half a second so that players don't accidentally start a song
|
||||
t[#t+1] = Def.Actor {
|
||||
StartSelectingStepsMessageCommand=function() SCREENMAN:GetTopScreen():lockinput(0.5); end;
|
||||
};
|
||||
|
||||
--
|
||||
t.InitCommand=cmd(Center;x,SCREEN_CENTER_X*1.5;diffusealpha,0);
|
||||
t.StartSelectingStepsMessageCommand=cmd(linear,0.2;diffusealpha,1);
|
||||
t.SongUnchosenMessageCommand=cmd(linear,0.2;diffusealpha,0);
|
||||
|
||||
|
||||
return t;
|
||||
@@ -1,12 +0,0 @@
|
||||
local t = Def.ActorFrame {
|
||||
Def.Quad {
|
||||
InitCommand=cmd(zoomto,SCREEN_WIDTH,SCREEN_HEIGHT);
|
||||
OnCommand=cmd(diffuse,Color.Black;diffusealpha,0);
|
||||
StartSelectingStepsMessageCommand=cmd(stoptweening;linear,0.2;diffusealpha,0.75);
|
||||
SongUnchosenMessageCommand=cmd(stoptweening;linear,0.2;diffusealpha,0);
|
||||
};
|
||||
};
|
||||
|
||||
t.InitCommand=cmd(Center);
|
||||
|
||||
return t;
|
||||
@@ -1,3 +0,0 @@
|
||||
local t = Def.ActorFrame {};
|
||||
t[#t+1] = StandardDecorationFromFileOptional("BackgroundFrame","BackgroundFrame");
|
||||
return t
|
||||
@@ -1,317 +0,0 @@
|
||||
function GetLocalProfiles()
|
||||
local ret = {};
|
||||
|
||||
for p = 0,PROFILEMAN:GetNumLocalProfiles()-1 do
|
||||
local profile=PROFILEMAN:GetLocalProfileFromIndex(p);
|
||||
local item = Def.ActorFrame {
|
||||
--[[ Def.Quad {
|
||||
InitCommand=cmd(zoomto,200,1;y,40/2);
|
||||
OnCommand=cmd(diffuse,Color('Outline'););
|
||||
}; --]]
|
||||
LoadFont("Common Normal") .. {
|
||||
Text=profile:GetDisplayName();
|
||||
InitCommand=cmd(shadowlength,1;y,-10;zoom,1;ztest,true);
|
||||
};
|
||||
LoadFont("Common Normal") .. {
|
||||
InitCommand=cmd(shadowlength,1;y,8;zoom,0.5;vertspacing,-8;ztest,true);
|
||||
BeginCommand=function(self)
|
||||
local numSongsPlayed = profile:GetNumTotalSongsPlayed();
|
||||
local s = numSongsPlayed == 1 and "Song" or "Songs";
|
||||
self:settext( string.format(THEME:GetString("ScreenSelectProfile","%d "..s.." Played"),numSongsPlayed) );
|
||||
end;
|
||||
};
|
||||
};
|
||||
table.insert( ret, item );
|
||||
end;
|
||||
|
||||
return ret;
|
||||
end;
|
||||
|
||||
function LoadCard(cColor)
|
||||
local t = Def.ActorFrame {
|
||||
LoadActor( THEME:GetPathG("ScreenSelectProfile","CardBackground") ) .. {
|
||||
InitCommand=cmd(diffuse,cColor);
|
||||
};
|
||||
LoadActor( THEME:GetPathG("ScreenSelectProfile","CardFrame") );
|
||||
};
|
||||
return t
|
||||
end
|
||||
function LoadPlayerStuff(Player)
|
||||
local ret = {};
|
||||
|
||||
local pn = (Player == PLAYER_1) and 1 or 2;
|
||||
|
||||
--[[ local t = LoadActor(THEME:GetPathB('', '_frame 3x3'), 'metal', 200, 230) .. {
|
||||
Name = 'BigFrame';
|
||||
}; --]]
|
||||
local t = Def.ActorFrame {
|
||||
Name = 'JoinFrame';
|
||||
LoadCard(Color('Orange'));
|
||||
--[[ Def.Quad {
|
||||
InitCommand=cmd(zoomto,200+4,230+4);
|
||||
OnCommand=cmd(shadowlength,1;diffuse,color("0,0,0,0.5"));
|
||||
};
|
||||
Def.Quad {
|
||||
InitCommand=cmd(zoomto,200,230);
|
||||
OnCommand=cmd(diffuse,Color('Orange');diffusealpha,0.5);
|
||||
}; --]]
|
||||
LoadFont("Common Normal") .. {
|
||||
Text=THEME:GetString("ScreenSelectProfile","PressStart");
|
||||
InitCommand=cmd(shadowlength,1);
|
||||
OnCommand=cmd(diffuseshift;effectcolor1,Color('White');effectcolor2,color("0.5,0.5,0.5"));
|
||||
};
|
||||
};
|
||||
table.insert( ret, t );
|
||||
|
||||
t = Def.ActorFrame {
|
||||
Name = 'BigFrame';
|
||||
LoadCard(PlayerColor(Player));
|
||||
};
|
||||
table.insert( ret, t );
|
||||
|
||||
--[[ t = LoadActor(THEME:GetPathB('', '_frame 3x3'), 'metal', 170, 20) .. {
|
||||
Name = 'SmallFrame';
|
||||
}; --]]
|
||||
t = Def.ActorFrame {
|
||||
Name = 'SmallFrame';
|
||||
--[[ Def.Quad {
|
||||
InitCommand=cmd(zoomto,170+4,32+4);
|
||||
OnCommand=cmd(shadowlength,1);
|
||||
}; --]]
|
||||
InitCommand=cmd(y,-2);
|
||||
Def.Quad {
|
||||
InitCommand=cmd(zoomto,200-10,40+2);
|
||||
OnCommand=cmd(diffuse,Color('Black');diffusealpha,0.5);
|
||||
};
|
||||
Def.Quad {
|
||||
InitCommand=cmd(zoomto,200-10,40);
|
||||
OnCommand=cmd(diffuse,PlayerColor(Player);fadeleft,0.25;faderight,0.25;glow,color("1,1,1,0.25"));
|
||||
};
|
||||
Def.Quad {
|
||||
InitCommand=cmd(zoomto,200-10,40;y,-40/2+20);
|
||||
OnCommand=cmd(diffuse,Color("Black");fadebottom,1;diffusealpha,0.35);
|
||||
};
|
||||
Def.Quad {
|
||||
InitCommand=cmd(zoomto,200-10,1;y,-40/2+1);
|
||||
OnCommand=cmd(diffuse,PlayerColor(Player);glow,color("1,1,1,0.25"));
|
||||
};
|
||||
};
|
||||
table.insert( ret, t );
|
||||
|
||||
t = Def.ActorScroller{
|
||||
Name = 'ProfileScroller';
|
||||
NumItemsToDraw=6;
|
||||
-- InitCommand=cmd(y,-230/2+20;);
|
||||
OnCommand=cmd(y,1;SetFastCatchup,true;SetMask,200,58;SetSecondsPerItem,0.15);
|
||||
TransformFunction=function(self, offset, itemIndex, numItems)
|
||||
local focus = scale(math.abs(offset),0,2,1,0);
|
||||
self:visible(false);
|
||||
self:y(math.floor( offset*40 ));
|
||||
-- self:zoomy( focus );
|
||||
-- self:z(-math.abs(offset));
|
||||
-- self:zoom(focus);
|
||||
end;
|
||||
children = GetLocalProfiles();
|
||||
};
|
||||
table.insert( ret, t );
|
||||
|
||||
t = Def.ActorFrame {
|
||||
Name = "EffectFrame";
|
||||
--[[ Def.Quad {
|
||||
InitCommand=cmd(y,-230/2;vertalign,top;zoomto,200,8;fadebottom,1);
|
||||
OnCommand=cmd(diffuse,Color("Black");diffusealpha,0.25);
|
||||
};
|
||||
Def.Quad {
|
||||
InitCommand=cmd(y,230/2;vertalign,bottom;zoomto,200,8;fadetop,1);
|
||||
OnCommand=cmd(diffuse,Color("Black");diffusealpha,0.25);
|
||||
}; --]]
|
||||
};
|
||||
table.insert( ret, t );
|
||||
--[[ t = Def.BitmapText {
|
||||
OnCommand = cmd(y,160);
|
||||
Name = 'SelectedProfileText';
|
||||
Font = "Common Normal";
|
||||
Text = 'No profile';
|
||||
}; --]]
|
||||
t = LoadFont("Common Normal") .. {
|
||||
Name = 'SelectedProfileText';
|
||||
--InitCommand=cmd(y,160;shadowlength,1;diffuse,PlayerColor(Player));
|
||||
InitCommand=cmd(y,160;shadowlength,1;);
|
||||
};
|
||||
table.insert( ret, t );
|
||||
|
||||
return ret;
|
||||
end;
|
||||
|
||||
function UpdateInternal3(self, Player)
|
||||
local pn = (Player == PLAYER_1) and 1 or 2;
|
||||
local frame = self:GetChild(string.format('P%uFrame', pn));
|
||||
local scroller = frame:GetChild('ProfileScroller');
|
||||
local seltext = frame:GetChild('SelectedProfileText');
|
||||
local joinframe = frame:GetChild('JoinFrame');
|
||||
local smallframe = frame:GetChild('SmallFrame');
|
||||
local bigframe = frame:GetChild('BigFrame');
|
||||
|
||||
if GAMESTATE:IsHumanPlayer(Player) then
|
||||
frame:visible(true);
|
||||
if MEMCARDMAN:GetCardState(Player) == 'MemoryCardState_none' then
|
||||
--using profile if any
|
||||
joinframe:visible(false);
|
||||
smallframe:visible(true);
|
||||
bigframe:visible(true);
|
||||
seltext:visible(true);
|
||||
scroller:visible(true);
|
||||
local ind = SCREENMAN:GetTopScreen():GetProfileIndex(Player);
|
||||
if ind > 0 then
|
||||
scroller:SetDestinationItem(ind-1);
|
||||
seltext:settext(PROFILEMAN:GetLocalProfileFromIndex(ind-1):GetDisplayName());
|
||||
else
|
||||
if SCREENMAN:GetTopScreen():SetProfileIndex(Player, 1) then
|
||||
scroller:SetDestinationItem(0);
|
||||
self:queuecommand('UpdateInternal2');
|
||||
else
|
||||
joinframe:visible(true);
|
||||
smallframe:visible(false);
|
||||
bigframe:visible(false);
|
||||
scroller:visible(false);
|
||||
seltext:settext('No profile');
|
||||
end;
|
||||
end;
|
||||
else
|
||||
--using card
|
||||
smallframe:visible(false);
|
||||
scroller:visible(false);
|
||||
seltext:settext('CARD');
|
||||
SCREENMAN:GetTopScreen():SetProfileIndex(Player, 0);
|
||||
end;
|
||||
else
|
||||
joinframe:visible(true);
|
||||
scroller:visible(false);
|
||||
seltext:visible(false);
|
||||
smallframe:visible(false);
|
||||
bigframe:visible(false);
|
||||
end;
|
||||
end;
|
||||
|
||||
-- Will be set to the main ActorFrame for the screen in its OnCommand.
|
||||
local main_frame= false
|
||||
|
||||
local function input(event)
|
||||
if event.type == "InputEventType_Release" then return end
|
||||
local pn= event.PlayerNumber
|
||||
local code= event.GameButton
|
||||
if not pn or not code then return end
|
||||
local input_functions= {
|
||||
Start= function()
|
||||
MESSAGEMAN:Broadcast("StartButton")
|
||||
if not GAMESTATE:IsHumanPlayer(pn) then
|
||||
SCREENMAN:GetTopScreen():SetProfileIndex(pn, -1)
|
||||
else
|
||||
SCREENMAN:GetTopScreen():Finish()
|
||||
end
|
||||
end,
|
||||
Back= function()
|
||||
if GAMESTATE:GetNumPlayersEnabled()==0 then
|
||||
SCREENMAN:GetTopScreen():Cancel()
|
||||
else
|
||||
MESSAGEMAN:Broadcast("BackButton")
|
||||
SCREENMAN:GetTopScreen():SetProfileIndex(pn, -2)
|
||||
end
|
||||
end,
|
||||
MenuUp= function()
|
||||
if GAMESTATE:IsHumanPlayer(pn) then
|
||||
local ind = SCREENMAN:GetTopScreen():GetProfileIndex(pn)
|
||||
if ind > 1 then
|
||||
if SCREENMAN:GetTopScreen():SetProfileIndex(pn, ind - 1) then
|
||||
MESSAGEMAN:Broadcast("DirectionButton")
|
||||
main_frame:queuecommand('UpdateInternal2')
|
||||
end
|
||||
end
|
||||
end
|
||||
end,
|
||||
MenuDown= function()
|
||||
if GAMESTATE:IsHumanPlayer(pn) then
|
||||
local ind = SCREENMAN:GetTopScreen():GetProfileIndex(pn)
|
||||
if ind > 0 then
|
||||
if SCREENMAN:GetTopScreen():SetProfileIndex(pn, ind + 1) then
|
||||
MESSAGEMAN:Broadcast("DirectionButton")
|
||||
main_frame:queuecommand('UpdateInternal2')
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
}
|
||||
input_functions.MenuLeft= input_functions.MenuUp
|
||||
input_functions.MenuRight= input_functions.MenuDown
|
||||
if input_functions[code] then
|
||||
input_functions[code]()
|
||||
end
|
||||
end
|
||||
|
||||
local t = Def.ActorFrame {
|
||||
|
||||
StorageDevicesChangedMessageCommand=function(self, params)
|
||||
self:queuecommand('UpdateInternal2');
|
||||
end;
|
||||
|
||||
PlayerJoinedMessageCommand=function(self, params)
|
||||
self:queuecommand('UpdateInternal2');
|
||||
end;
|
||||
|
||||
PlayerUnjoinedMessageCommand=function(self, params)
|
||||
self:queuecommand('UpdateInternal2');
|
||||
end;
|
||||
|
||||
OnCommand=function(self, params)
|
||||
main_frame= self:GetParent()
|
||||
SCREENMAN:GetTopScreen():AddInputCallback(input)
|
||||
self:queuecommand('UpdateInternal2');
|
||||
end;
|
||||
|
||||
UpdateInternal2Command=function(self)
|
||||
UpdateInternal3(self, PLAYER_1);
|
||||
UpdateInternal3(self, PLAYER_2);
|
||||
end;
|
||||
|
||||
children = {
|
||||
Def.ActorFrame {
|
||||
Name = 'P1Frame';
|
||||
InitCommand=cmd(x,SCREEN_CENTER_X-160;y,SCREEN_CENTER_Y);
|
||||
OnCommand=cmd(zoom,0;bounceend,0.35;zoom,1);
|
||||
OffCommand=cmd(bouncebegin,0.35;zoom,0);
|
||||
PlayerJoinedMessageCommand=function(self,param)
|
||||
if param.Player == PLAYER_1 then
|
||||
(cmd(;zoom,1.15;bounceend,0.175;zoom,1.0;))(self);
|
||||
end;
|
||||
end;
|
||||
children = LoadPlayerStuff(PLAYER_1);
|
||||
};
|
||||
Def.ActorFrame {
|
||||
Name = 'P2Frame';
|
||||
InitCommand=cmd(x,SCREEN_CENTER_X+160;y,SCREEN_CENTER_Y);
|
||||
OnCommand=cmd(zoom,0;bounceend,0.35;zoom,1);
|
||||
OffCommand=cmd(bouncebegin,0.35;zoom,0);
|
||||
PlayerJoinedMessageCommand=function(self,param)
|
||||
if param.Player == PLAYER_2 then
|
||||
(cmd(zoom,1.15;bounceend,0.175;zoom,1.0;))(self);
|
||||
end;
|
||||
end;
|
||||
children = LoadPlayerStuff(PLAYER_2);
|
||||
};
|
||||
-- sounds
|
||||
LoadActor( THEME:GetPathS("Common","start") )..{
|
||||
IsAction= true,
|
||||
StartButtonMessageCommand=cmd(play);
|
||||
};
|
||||
LoadActor( THEME:GetPathS("Common","cancel") )..{
|
||||
IsAction= true,
|
||||
BackButtonMessageCommand=cmd(play);
|
||||
};
|
||||
LoadActor( THEME:GetPathS("Common","value") )..{
|
||||
IsAction= true,
|
||||
DirectionButtonMessageCommand=cmd(play);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
return t;
|
||||
@@ -1 +0,0 @@
|
||||
ScreenPlayerOptions background
|
||||
@@ -1 +0,0 @@
|
||||
_blank
|
||||
@@ -1,32 +0,0 @@
|
||||
if not GAMESTATE:IsCourseMode() then return Def.ActorFrame{} end; -- short circuit
|
||||
local course = GAMESTATE:GetCurrentCourse()
|
||||
|
||||
local t = Def.ActorFrame{
|
||||
-- background
|
||||
Def.Sprite{
|
||||
InitCommand=cmd(Center);
|
||||
BeginCommand=function(self)
|
||||
if course:GetBackgroundPath() then
|
||||
self:Load( course:GetBackgroundPath() )
|
||||
else
|
||||
-- default to the BG of the first song in the course
|
||||
self:LoadFromCurrentSongBackground()
|
||||
end
|
||||
end;
|
||||
OnCommand=cmd(diffusealpha,0;scale_or_crop_background;sleep,0.5;linear,0.50;diffusealpha,1;sleep,3);
|
||||
};
|
||||
-- alternate background
|
||||
Def.Sprite{
|
||||
InitCommand=cmd(Center;);
|
||||
BeginCommand=cmd(LoadFromCurrentSongBackground;scale_or_crop_background;diffusealpha,0);
|
||||
OnCommand=cmd(sleep,4;playcommand,"Show");
|
||||
ShowCommand=function(self)
|
||||
if course:HasBackground() then
|
||||
self:accelerate(0.25)
|
||||
self:diffusealpha(1)
|
||||
end
|
||||
end;
|
||||
};
|
||||
};
|
||||
|
||||
return t;
|
||||
@@ -1,92 +0,0 @@
|
||||
local playMode = GAMESTATE:GetPlayMode()
|
||||
|
||||
local sStage = ""
|
||||
sStage = GAMESTATE:GetCurrentStage()
|
||||
|
||||
if playMode ~= 'PlayMode_Regular' and playMode ~= 'PlayMode_Rave' and playMode ~= 'PlayMode_Battle' then
|
||||
sStage = playMode;
|
||||
end;
|
||||
|
||||
local t = Def.ActorFrame {};
|
||||
t[#t+1] = Def.Quad {
|
||||
InitCommand=cmd(Center;zoomto,SCREEN_WIDTH,SCREEN_HEIGHT;diffuse,Color("Black"));
|
||||
};
|
||||
if GAMESTATE:IsCourseMode() then
|
||||
t[#t+1] = LoadActor("CourseDisplay");
|
||||
else
|
||||
t[#t+1] = Def.Sprite {
|
||||
InitCommand=cmd(Center;diffusealpha,0);
|
||||
BeginCommand=cmd(LoadFromCurrentSongBackground);
|
||||
OnCommand=function(self)
|
||||
self:scale_or_crop_background()
|
||||
self:sleep(0.5)
|
||||
self:linear(0.50)
|
||||
self:diffusealpha(1)
|
||||
self:sleep(3)
|
||||
end;
|
||||
};
|
||||
end
|
||||
|
||||
local stage_num_actor= THEME:GetPathG("ScreenStageInformation", "Stage " .. ToEnumShortString(sStage), true)
|
||||
if stage_num_actor ~= "" and FILEMAN:DoesFileExist(stage_num_actor) then
|
||||
stage_num_actor= LoadActor(stage_num_actor)
|
||||
else
|
||||
-- Midiman: We need a "Stage Next" actor or something for stages after
|
||||
-- the 6th. -Kyz
|
||||
local curStage = GAMESTATE:GetCurrentStage();
|
||||
stage_num_actor= Def.BitmapText{
|
||||
Font= "Common Normal", Text= thified_curstage_index(false) .. " Stage",
|
||||
InitCommand= function(self)
|
||||
self:zoom(1.5)
|
||||
self:strokecolor(Color.Black)
|
||||
self:diffuse(StageToColor(curStage));
|
||||
self:diffusetopedge(ColorLightTone(StageToColor(curStage)));
|
||||
end
|
||||
}
|
||||
end
|
||||
|
||||
t[#t+1] = Def.ActorFrame {
|
||||
InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y);
|
||||
OnCommand=cmd(stoptweening;zoom,1.25;decelerate,3;zoom,1);
|
||||
stage_num_actor .. {
|
||||
OnCommand=cmd(diffusealpha,0;linear,0.25;diffusealpha,1;sleep,1.75;linear,0.5;zoomy,0;zoomx,2;diffusealpha,0);
|
||||
};
|
||||
};
|
||||
|
||||
t[#t+1] = Def.ActorFrame {
|
||||
InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y+96);
|
||||
OnCommand=cmd(stoptweening;addy,-16;decelerate,3;addy,16);
|
||||
LoadFont("Common Normal") .. {
|
||||
Text=GAMESTATE:IsCourseMode() and GAMESTATE:GetCurrentCourse():GetDisplayFullTitle() or GAMESTATE:GetCurrentSong():GetDisplayFullTitle();
|
||||
InitCommand=cmd(strokecolor,Color("Outline");y,-20);
|
||||
OnCommand=cmd(diffusealpha,0;linear,0.5;diffusealpha,1;sleep,1.5;linear,0.5;diffusealpha,0);
|
||||
};
|
||||
LoadFont("Common Normal") .. {
|
||||
Text=GAMESTATE:IsCourseMode() and ToEnumShortString( GAMESTATE:GetCurrentCourse():GetCourseType() ) or GAMESTATE:GetCurrentSong():GetDisplayArtist();
|
||||
InitCommand=cmd(strokecolor,Color("Outline");zoom,0.75);
|
||||
OnCommand=cmd(diffusealpha,0;linear,0.5;diffusealpha,1;sleep,1.5;linear,0.5;diffusealpha,0);
|
||||
};
|
||||
LoadFont("Common Normal") .. {
|
||||
InitCommand=cmd(strokecolor,Color("Outline");diffuse,Color("Orange");diffusebottomedge,Color("Yellow");zoom,0.75;y,20);
|
||||
BeginCommand=function(self)
|
||||
local text = "";
|
||||
local SongOrCourse;
|
||||
if GAMESTATE:IsCourseMode() then
|
||||
local trail = GAMESTATE:GetCurrentTrail(GAMESTATE:GetMasterPlayerNumber());
|
||||
SongOrCourse = GAMESTATE:GetCurrentCourse();
|
||||
if SongOrCourse:GetEstimatedNumStages() == 1 then
|
||||
text = SongOrCourse:GetEstimatedNumStages() .." Stage / ".. SecondsToMSSMsMs( TrailUtil.GetTotalSeconds(trail) );
|
||||
else
|
||||
text = SongOrCourse:GetEstimatedNumStages() .." Stages / ".. SecondsToMSSMsMs( TrailUtil.GetTotalSeconds(trail) );
|
||||
end
|
||||
else
|
||||
SongOrCourse = GAMESTATE:GetCurrentSong();
|
||||
text = SecondsToMSSMsMs( SongOrCourse:MusicLengthSeconds() );
|
||||
end;
|
||||
self:settext(text);
|
||||
end;
|
||||
OnCommand=cmd(diffusealpha,0;linear,0.5;diffusealpha,1;sleep,1.5;linear,0.5;diffusealpha,0);
|
||||
};
|
||||
};
|
||||
|
||||
return t
|
||||
@@ -1,48 +0,0 @@
|
||||
local t = Def.ActorFrame {};
|
||||
local bOpen = false;
|
||||
local function GetTime(self)
|
||||
-- Painfully ugly, sorry.
|
||||
local c = self:GetChildren();
|
||||
local tTime = { Hour = nil, Minute = nil, Second = nil, Append = nil};
|
||||
|
||||
if Hour() then tTime.Hour = Hour() else tTime.Hour = 0 end;
|
||||
if Minute() then tTime.Minute = Minute() else tTime.Minute = 0 end;
|
||||
if Second() then tTime.Second = Second() else tTime.Second = 0 end;
|
||||
|
||||
if( Hour() < 12 ) then
|
||||
tTime.Append = "AM"
|
||||
else
|
||||
tTime.Append = "PM"
|
||||
end;
|
||||
|
||||
if( Hour() == 0 ) then
|
||||
tTime.Hour = 12;
|
||||
end;
|
||||
|
||||
c.Time:settextf("%02i:%02i:%02i %s",tTime.Hour,tTime.Minute,tTime.Second,tTime.Append);
|
||||
end;
|
||||
t[#t+1] = Def.ActorFrame {
|
||||
Def.ActorFrame {
|
||||
LoadActor(THEME:GetPathB("","_frame 3x3"),"rounded black",96,12) .. {
|
||||
Name="Background";
|
||||
};
|
||||
LoadFont("Common Normal") .. {
|
||||
Text="Test";
|
||||
Name="Time";
|
||||
InitCommand=cmd(zoom,0.675);
|
||||
};
|
||||
--
|
||||
BeginCommand=function(self)
|
||||
self:SetUpdateFunction( GetTime );
|
||||
self:SetUpdateRate( 1/30 );
|
||||
end;
|
||||
};
|
||||
ToggleConsoleDisplayMessageCommand=function(self)
|
||||
bOpen = not bOpen;
|
||||
if bOpen then self:playcommand("Show") else self:playcommand("Hide") end
|
||||
end;
|
||||
InitCommand=cmd(x,SCREEN_RIGHT-50;y,10;visible,false);
|
||||
ShowCommand=cmd(finishtweening;visible,true);
|
||||
HideCommand=cmd(finishtweening;visible,false);
|
||||
};
|
||||
return t;
|
||||
@@ -1 +0,0 @@
|
||||
ScreenMiniMenu underlay
|
||||
@@ -1,3 +0,0 @@
|
||||
local t = LoadFallbackB();
|
||||
t[#t+1] = LoadActor( THEME:GetPathB("_Arcade","decorations") );
|
||||
return t
|
||||
@@ -1,12 +0,0 @@
|
||||
local t = Def.ActorFrame{};
|
||||
|
||||
-- todo: add event mode indicators and such
|
||||
if GAMESTATE:IsEventMode() then
|
||||
t[#t+1] = LoadFont("Common Large")..{
|
||||
Text=Screen.String("EventMode");
|
||||
InitCommand=cmd(CenterX;y,SCREEN_BOTTOM-72;zoom,0.675;diffuse,Color.Yellow;strokecolor,ColorDarkTone(Color.Yellow);shadowlength,1);
|
||||
OnCommand=cmd(glowshift;textglowmode,'TextGlowMode_Inner';effectperiod,2);
|
||||
};
|
||||
end;
|
||||
|
||||
return t;
|
||||
@@ -1,31 +0,0 @@
|
||||
InitUserPrefs();
|
||||
|
||||
local t = Def.ActorFrame {}
|
||||
|
||||
t[#t+1] = StandardDecorationFromFileOptional("Footer","Footer");
|
||||
t[#t+1] = StandardDecorationFromFileOptional("Logo","Logo");
|
||||
t[#t+1] = StandardDecorationFromFileOptional("VersionInfo","VersionInfo");
|
||||
t[#t+1] = StandardDecorationFromFileOptional("CurrentGametype","CurrentGametype");
|
||||
t[#t+1] = StandardDecorationFromFileOptional("LifeDifficulty","LifeDifficulty");
|
||||
t[#t+1] = StandardDecorationFromFileOptional("TimingDifficulty","TimingDifficulty");
|
||||
t[#t+1] = StandardDecorationFromFileOptional("NetworkStatus","NetworkStatus");
|
||||
t[#t+1] = StandardDecorationFromFileOptional("SystemDirection","SystemDirection");
|
||||
|
||||
t[#t+1] = StandardDecorationFromFileOptional("NumSongs","NumSongs") .. {
|
||||
SetCommand=function(self)
|
||||
local InstalledSongs, InstalledCourses, Groups, Unlocked = 0;
|
||||
if SONGMAN:GetRandomSong() then
|
||||
InstalledSongs, InstalledCourses, Groups, Unlocked =
|
||||
SONGMAN:GetNumSongs(),
|
||||
SONGMAN:GetNumCourses(),
|
||||
SONGMAN:GetNumSongGroups(),
|
||||
SONGMAN:GetNumUnlockedSongs();
|
||||
else
|
||||
return
|
||||
end
|
||||
|
||||
self:settextf(THEME:GetString("ScreenTitleMenu","%i Songs (%i Groups), %i Courses"), InstalledSongs, Groups, InstalledCourses);
|
||||
end;
|
||||
};
|
||||
|
||||
return t
|
||||
|
Before Width: | Height: | Size: 1.4 KiB |
@@ -1,10 +0,0 @@
|
||||
return Def.ActorFrame {
|
||||
Def.Quad {
|
||||
InitCommand=cmd(horizalign,left;vertalign,top;y,SCREEN_TOP+8);
|
||||
OnCommand=cmd(diffuse,Color.Black;diffusealpha,0.5;zoomto,256,84;faderight,1);
|
||||
};
|
||||
Def.Quad {
|
||||
InitCommand=cmd(horizalign,right;vertalign,top;x,SCREEN_RIGHT;y,SCREEN_TOP+8);
|
||||
OnCommand=cmd(diffuse,Color.Black;diffusealpha,0.5;zoomto,256,46;fadeleft,1);
|
||||
};
|
||||
};
|
||||
@@ -1,80 +0,0 @@
|
||||
local function Clock()
|
||||
function UpdateVisible(self)
|
||||
local screen = SCREENMAN:GetTopScreen()
|
||||
local bShow = true
|
||||
if screen then
|
||||
local sClass = screen:GetName()
|
||||
bShow = THEME:GetMetric(sClass, "ShowClock")
|
||||
end
|
||||
if bShow then
|
||||
self:smooth(0.25)
|
||||
self:y(12)
|
||||
else
|
||||
self:smooth(0.25)
|
||||
self:y(-56)
|
||||
end
|
||||
end
|
||||
-- clock
|
||||
clock = Def.ActorFrame {
|
||||
Name="Clock",
|
||||
InitCommand=cmd(x,50;y,12;playcommand,"Update"),
|
||||
ScreenChangedMessageCommand=UpdateVisible,
|
||||
UpdateCommand=cmd(runcommandsonleaves,cmd(queuecommand,"Update")),
|
||||
Def.RoundedBox(90,26)..{ InitCommand=cmd(x,-22;y,-4) },
|
||||
Def.ActorFrame {
|
||||
Name="ClockText",
|
||||
InitCommand=cmd(y,-2),
|
||||
LoadFont("Common", "normal")..{
|
||||
Text="00:00:",
|
||||
InitCommand=cmd(horizalign,right;shadowlength,0;diffusebottomedge,color("0.9,0.9,0.9")),
|
||||
UpdateCommand=function(self)
|
||||
local hour, min = Hour(), Minute()
|
||||
if hour > 12 and GetUserPrefB("Use12HourClock") then
|
||||
hour = hour - 12
|
||||
elseif hour == 0 and GetUserPrefB("Use12HourClock") then
|
||||
hour = 12
|
||||
end
|
||||
self:settext(string.format('%02i:%02i:', hour, min))
|
||||
self:sleep(1)
|
||||
self:queuecommand("Update")
|
||||
end
|
||||
},
|
||||
LoadFont("Common", "normal")..{
|
||||
Text="00",
|
||||
InitCommand=cmd(horizalign,left;shadowlength,0;diffusebottomedge,color("0.9,0.9,0.9")),
|
||||
UpdateCommand=function(self)
|
||||
local sec = Second()
|
||||
self:settext(string.format('%02i', sec))
|
||||
self:sleep(1)
|
||||
self:queuecommand("Update")
|
||||
end,
|
||||
},
|
||||
LoadFont("Common", "normal")..{
|
||||
Text="",
|
||||
InitCommand=cmd(x,28;y,-3;horizalign,left;shadowlength,0;diffusebottomedge,color("0.9,0.9,0.9");visible,false;zoom,0.75),
|
||||
UpdateCommand=function(self)
|
||||
if not GetUserPrefB("Use12HourClock") then
|
||||
self:visible(false)
|
||||
return
|
||||
end
|
||||
local hour = Hour()
|
||||
if hour < 12 then
|
||||
self:settext("AM")
|
||||
self:diffuse(color("1,0.85,0,1"))
|
||||
self:diffusebottomedge(color("0.75,0.55,0,1"))
|
||||
else
|
||||
self:settext("PM")
|
||||
self:diffuse(color("0,0.85,1,1"))
|
||||
self:diffusebottomedge(color("0,0.55,1,1"))
|
||||
end
|
||||
self:visible(true)
|
||||
self:sleep(1)
|
||||
self:queuecommand("Update")
|
||||
end
|
||||
}
|
||||
}
|
||||
}
|
||||
return clock;
|
||||
end
|
||||
local t = Def.ActorFrame {};
|
||||
return t;
|
||||
|
Before Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 111 B |
|
Before Width: | Height: | Size: 2.0 KiB |