Add new 5.1 default theme Lambda

I'd like to thank everyone who made this possible;, including but not
limited to Riakodoadm, MrThatKid, kyzentun, Luizsan, JoseVarelaP,
everyone else who provided feedback and bug reports.
This commit is contained in:
ListenerJubatus
2017-08-08 01:07:34 -06:00
parent 4c5319c888
commit f257f19dad
1015 changed files with 17245 additions and 3865 deletions
+8
View File
@@ -0,0 +1,8 @@
local fSleepTime = THEME:GetMetric( Var "LoadingScreen","ScreenOutDelay");
return Def.ActorFrame {
StartTransitioningCommand=cmd(sleep,0.15+fSleepTime);
Def.Quad {
InitCommand=cmd(Center;zoomto,SCREEN_WIDTH+1,SCREEN_HEIGHT;draworder,10000);
StartTransitioningCommand=cmd(diffuse,color("0,0,0,0");diffusealpha,1;sleep,fSleepTime;linear,0.3;diffusealpha,0);
};
};
+7
View File
@@ -0,0 +1,7 @@
return Def.ActorFrame {
StartTransitioningCommand=cmd(sleep,0.15);
Def.Quad {
InitCommand=cmd(Center;zoomto,SCREEN_WIDTH+1,SCREEN_HEIGHT;draworder,10000);
StartTransitioningCommand=cmd(diffusealpha,0;diffuse,color("0,0,0,0");linear,0.3;diffusealpha,1);
};
};
Binary file not shown.

After

Width:  |  Height:  |  Size: 302 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

@@ -0,0 +1,26 @@
-- You know what, I guess the "fancy UI background" theme option can be put to use.
if ThemePrefs.Get("FancyUIBG") then
return Def.ActorFrame {
Def.Quad {
InitCommand=cmd(Center;zoomto,SCREEN_WIDTH,SCREEN_HEIGHT;diffuse,color("#093A3E");diffusetopedge,color("#000000"););
};
LoadActor("_base") .. {
InitCommand=cmd(Center;zoomto,SCREEN_WIDTH,SCREEN_HEIGHT;blend,'BlendMode_Add';);
},
LoadActor("_barcode") .. {
InitCommand=cmd(zoomto,36,1024;diffuse,color("#65F0FD");x,SCREEN_LEFT+15;y,SCREEN_CENTER_Y;diffusealpha,0.1);
OnCommand=cmd(customtexturerect,0,0,1,1;texcoordvelocity,0,-0.1);
};
LoadActor("_barcode") .. {
InitCommand=cmd(zoomto,36,1024;diffuse,color("#65F0FD");x,SCREEN_RIGHT-15;y,SCREEN_CENTER_Y;diffusealpha,0.1);
OnCommand=cmd(customtexturerect,0,0,1,1;texcoordvelocity,0,0.1);
};
};
else
return Def.Quad {
InitCommand=cmd(zoomto,SCREEN_WIDTH,SCREEN_HEIGHT;diffuse,color("#222222");diffusetopedge,color("#000000"););
};
end
@@ -1,7 +1,7 @@
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);
StartTransitioningCommand=cmd(diffuse,color("0,0,0,0.5");sleep,5/60;diffusealpha,1;sleep,5/60);
};
LoadActor(THEME:GetPathS("_Screen","cancel")) .. {
IsAction= true,
@@ -1,8 +1,7 @@
local fSleepTime = THEME:GetMetric( Var "LoadingScreen","ScreenOutDelay");
return Def.ActorFrame {
StartTransitioningCommand=cmd(sleep,0.7);
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);
InitCommand=cmd(Center;zoomto,SCREEN_WIDTH+1,SCREEN_HEIGHT;draworder,10000);
StartTransitioningCommand=cmd(diffusealpha,0;diffuse,color("0,0,0,0");sleep,0.6;linear,0.15;diffusealpha,0);
};
};
};
@@ -0,0 +1 @@
Fade in
Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

@@ -1,45 +1,37 @@
local t = Def.ActorFrame {};
t[#t+1] = LoadActor(THEME:GetPathG("common bg", "base")) .. {
InitCommand=cmd(Center;zoomto,SCREEN_WIDTH,SCREEN_HEIGHT)
};
-- 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);
OnCommand=cmd(diffuse,Color.Black;diffusealpha,0.8);
};
};
-- Emblem
t[#t+1] = Def.ActorFrame {
InitCommand=cmd(Center);
InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y);
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") .. {
InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y-120);
OnCommand=cmd(diffusealpha,0;linear,0.2;diffusealpha,1);
LoadFont("_roboto condensed Bold 48px") .. {
Text=Screen.String("Caution");
OnCommand=cmd(skewx,-0.125;diffuse,color("#ffd400");strokecolor,ColorDarkTone(color("#ffd400")));
OnCommand=cmd(skewx,-0.1;diffuse,color("#E6BF7C");diffusebottomedge,color("#FFB682");strokecolor,color("#594420"););
};
LoadFont("Common Normal") .. {
LoadFont("Common Fallback Font") .. {
Text=Screen.String("CautionText");
InitCommand=cmd(y,128);
OnCommand=cmd(strokecolor,color("0,0,0,0.5");shadowlength,1;wrapwidthpixels,SCREEN_WIDTH-80);
OnCommand=cmd(strokecolor,color("0,0,0,0.5");shadowlength,1;wrapwidthpixels,SCREEN_WIDTH/0.5);
};
};
--
@@ -0,0 +1,76 @@
return Def.ActorFrame{
-- "header"
Def.Quad {
InitCommand=cmd(vertalign,top;x,_screen.cx;zoomto,_screen.w,80),
OnCommand=function(self)
self:diffuse(ScreenColor("Default")):diffusetopedge(ColorDarkTone(ScreenColor("Default"))):diffusealpha(0.8)
end
},
-- The "header's" "shadow"
Def.Quad {
InitCommand=cmd(vertalign,top;x,_screen.cx;zoomto,SCREEN_WIDTH,8;y,80),
OnCommand=cmd(diffuse,Color("Black");fadebottom,1;diffusealpha,0.6)
},
-- "footer"
Def.Quad {
InitCommand=cmd(vertalign,bottom;x,_screen.cx;y,_screen.h;zoomto,_screen.w,96),
OnCommand=function(self)
self:diffuse(ScreenColor("Default")):diffusebottomedge(ColorDarkTone(ScreenColor("Default"))):diffusealpha(0.8)
end
},
-- The "footer's" "shadow"
Def.Quad {
InitCommand=cmd(vertalign,bottom;x,_screen.cx;y,_screen.h-96;zoomto,_screen.w,8),
OnCommand=cmd(diffuse,Color("Black");fadetop,1;diffusealpha,0.6)
},
-- A temporary frame for the jacket.
Def.Quad {
InitCommand=cmd(horizalign,right;vertalign,bottom;x,_screen.w-39;y,_screen.h-14;zoomto,192,192;
diffuse,ColorDarkTone(ScreenColor("Default"));diffusealpha,0.9)
},
-- Jacket (real or not) of the currently playing song.
-- todo: make getting the jacket a bit more of a... global function?
Def.Sprite {
InitCommand=cmd(horizalign,right;vertalign,bottom;x,_screen.w-49;y,_screen.h-24),
OnCommand=function(self)
local song = GAMESTATE:GetCurrentSong()
if song and song:HasJacket() then
-- ...The jacket on ScreenEditMenu overlay uses LoadBanner instead of just Load.
-- Will it make any difference? ... I mean, probably not, but we'll see.
self:LoadBanner(song:GetJacketPath())
elseif song and song:HasBackground() then
self:LoadBanner(song:GetBackgroundPath())
else
self:LoadBanner(THEME:GetPathG("Common","fallback background"))
end
self:scaletoclipped(172,172)
end
},
-- Song title.
Def.BitmapText {
Font = "Common Fallback Font",
InitCommand=cmd(horizalign,right;x,_screen.w-250;y,_screen.h-64;strokecolor,color("#42292E")),
OnCommand=function(self)
local song = GAMESTATE:GetCurrentSong()
if song then
self:settext(song:GetDisplayFullTitle())
else
self:settext("")
end
end
},
-- Song artist.
Def.BitmapText {
Font = "Common Fallback Font",
InitCommand=cmd(horizalign,right;x,_screen.w-250;y,_screen.h-40;zoom,0.7;strokecolor,color("#42292E")),
OnCommand=function(self)
local song = GAMESTATE:GetCurrentSong()
if song then
self:settext(song:GetDisplayArtist())
else
self:settext("")
end
end
},
}
@@ -1,26 +1,15 @@
local t = Def.ActorFrame {
InitCommand=cmd(fov,90);
};
local t = Def.ActorFrame {};
t[#t+1] = Def.ActorFrame {
FOV=90;
InitCommand=cmd(Center);
LoadActor( THEME:GetPathB("ScreenWithMenuElements","background/_bg top") ) .. {
Def.Quad {
InitCommand=cmd(scaletoclipped,SCREEN_WIDTH,SCREEN_HEIGHT);
OnCommand=cmd(diffuse,ColorMidTone(color("#451A20"));diffusebottomedge,ColorMidTone(color("#5E2A30"));diffusealpha,0.9);
};
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);
LoadActor (GetSongBackground()) .. {
InitCommand=cmd(scaletoclipped,SCREEN_WIDTH,SCREEN_HEIGHT);
OnCommand=cmd(diffusealpha,0.1;);
};
};
@@ -0,0 +1,18 @@
local t = Def.ActorFrame {};
t[#t+1] = Def.ActorFrame {
InitCommand=cmd(Center);
Def.Quad {
InitCommand=cmd(scaletoclipped,SCREEN_WIDTH,SCREEN_HEIGHT);
OnCommand=cmd(diffuse,color("#947B7E");diffusebottomedge,color("#D698A0"));
};
};
t[#t+1] = Def.ActorFrame {
Def.Quad {
InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y+20;zoomto,SCREEN_WIDTH,SCREEN_HEIGHT*0.70;);
OnCommand=cmd(diffuse,color("#61414B");diffusealpha,0.4);
};
};
return t;
@@ -0,0 +1,6 @@
local transition_params = {
color = color("#914D56"),
transition_type = "in"
}
return LoadActor(THEME:GetPathB("", "_transition"), transition_params)
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 543 B

@@ -1,259 +1,351 @@
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;
-- ...So I realize that I completely ignored almost each and every
-- metrics-bound element this screen could use, but it's okay, right?
-- todo: make a more metrics-bound version of this screen anyways for beginner accessibility.
-- todo: accommodate EvaluationSummary too
local t = LoadFallbackB()
-- A very useful table...
local eval_lines = {
"W1",
"W2",
"W3",
"W4",
"W5",
"Miss",
"Held",
"MaxCombo"
}
-- And a function to make even better use out of the table.
local function GetJLineValue(line, pl)
if line == "Held" then
return STATSMAN:GetCurStageStats():GetPlayerStageStats(pl):GetHoldNoteScores("HoldNoteScore_Held")
elseif line == "MaxCombo" then
return STATSMAN:GetCurStageStats():GetPlayerStageStats(pl):MaxCombo()
else
return STATSMAN:GetCurStageStats():GetPlayerStageStats(pl):GetTapNoteScores("TapNoteScore_" .. line)
end
return "???"
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;
-- You know what, we'll deal with getting the overall scores with a function too.
local function GetPlScore(pl, scoretype)
local primary_score = STATSMAN:GetCurStageStats():GetPlayerStageStats(pl):GetScore()
local secondary_score = FormatPercentScore(STATSMAN:GetCurStageStats():GetPlayerStageStats(pl):GetPercentDancePoints())
if PREFSMAN:GetPreference("PercentageScoring") then
primary_score, secondary_score = secondary_score, primary_score
end
if scoretype == "primary" then
return primary_score
else
return secondary_score
end
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)
-- #################################################
-- That's enough functions; let's get this done.
-- Shared portion.
local mid_pane = Def.ActorFrame {
OnCommand=cmd(diffusealpha,0;sleep,0.3;decelerate,0.4;diffusealpha,1);
OffCommand=cmd(decelerate,0.3;diffusealpha,0);
-- Song/course banner.
Def.Sprite {
InitCommand=function(self)
local target = GAMESTATE:IsCourseMode() and GAMESTATE:GetCurrentCourse() or GAMESTATE:GetCurrentSong()
if target and target:HasBanner() then
self:Load(target:GetBannerPath())
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));
self:Load(THEME:GetPathG("Common fallback", "banner"))
end
self:scaletoclipped(468,146):x(_screen.cx):y(_screen.cy-173):zoom(0.8)
end
},
-- Banner frame.
LoadActor("_bannerframe") .. {
InitCommand=cmd(x,_screen.cx;y,_screen.cy-172;zoom,0.8)
}
}
local pss = STATSMAN:GetPlayedStageStats(1):GetPlayerStageStats(pn);
if pss then
local pct = pss:GetPercentDancePoints();
if pct == 1 then
self:settext("100%");
-- Text that's slapped on top of the banner frame.
if not GAMESTATE:IsCourseMode() then
mid_pane[#mid_pane+1] = LoadActor(THEME:GetPathG("ScreenEvaluation", "StageDisplay")) .. {
OnCommand=cmd(x,_screen.cx;y,_screen.cy-98;diffuse,color("#9d324e"))
}
else
mid_pane[#mid_pane+1] = Def.BitmapText {
Font="_roboto condensed Bold italic 24px",
InitCommand=function(self)
local course = GAMESTATE:GetCurrentCourse()
self:settext(string.upper(ToEnumShortString( course:GetCourseType() )))
self:x(_screen.cx):y(_screen.cy-98):diffuse(color("#9d324e"))
end,
OnCommand=cmd(playcommand,"Set";zoomx,0.8;diffusealpha,0;decelerate,0.4;zoomx,1;diffusealpha,1),
OffCommand=cmd(decelerate,0.4;diffusealpha,0)
}
end
-- Each line's text, and associated decorations.
for i, v in ipairs(eval_lines) do
local spacing = 38*i
local cur_line = "JudgmentLine_" .. v
mid_pane[#mid_pane+1] = Def.ActorFrame{
InitCommand=cmd(x,_screen.cx;y,(_screen.cy/1.4)+(spacing)),
OffCommand=function(self)
self:sleep(0.06 * i):decelerate(0.1):diffusealpha(0)
end;
Def.Quad {
InitCommand=cmd(zoomto,400,36;diffuse,JudgmentLineToColor(cur_line);fadeleft,0.5;faderight,0.5;);
OnCommand=function(self)
self:diffusealpha(0):sleep(0.1 * i):decelerate(0.9):diffusealpha(1)
end;
};
Def.BitmapText {
Font = "_roboto condensed Bold 48px",
InitCommand=cmd(zoom,0.6;diffuse,color("#000000");settext,string.upper(JudgmentLineToLocalizedString(cur_line)));
OnCommand=function(self)
self:diffusealpha(0):sleep(0.1 * i):decelerate(0.9):diffusealpha(0.6)
end;
}
}
end
t[#t+1] = mid_pane
-- #################################################
-- Time to deal with all of the player stats. ALL OF THEM.
local eval_parts = Def.ActorFrame {}
for ip, p in ipairs(GAMESTATE:GetHumanPlayers()) do
-- Some things to help positioning
local step_count_offs = string.find(p, "P1") and -150 or 150
local grade_parts_offs = string.find(p, "P1") and -320 or 320
local p_grade = STATSMAN:GetCurStageStats():GetPlayerStageStats(p):GetGrade()
-- Step counts.
for i, v in ipairs(eval_lines) do
local spacing = 38*i
eval_parts[#eval_parts+1] = Def.BitmapText {
Font = "_overpass 36px",
InitCommand=cmd(x,_screen.cx + step_count_offs;y,(_screen.cy/1.4)+(spacing);diffuse,ColorDarkTone(PlayerColor(p));zoom,0.75;diffusealpha,1.0;shadowlength,1),
OnCommand=function(self)
self:settext(GetJLineValue(v, p))
if string.find(p, "P1") then
self:horizalign(right)
else
self:settext(FormatPercentScore(pct));
end;
self:horizalign(left)
end
self:diffusealpha(0):sleep(0.1 * i):decelerate(0.9):diffusealpha(1)
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;
OffCommand=function(self)
self:sleep(0.1 * i):decelerate(0.3):diffusealpha(0)
end;
};
t[#t+1] = StandardDecorationFromTable( "StepsDisplay" .. ToEnumShortString(pn), t2 );
t[#t+1] = StandardDecorationFromTable( "PercentScore" .. ToEnumShortString(pn), PercentScore(pn) );
}
end
end
-- Primary score.
eval_parts[#eval_parts+1] = Def.BitmapText {
Font = "_overpass 36px",
InitCommand=cmd(horizalign,center;x,_screen.cx + (grade_parts_offs);y,(_screen.cy-65);diffuse,ColorMidTone(PlayerColor(p));zoom,1;shadowlength,1),
OnCommand=function(self)
self:settext(GetPlScore(p, "primary")):diffusealpha(0):sleep(0.5):decelerate(0.3):diffusealpha(1)
end;
OffCommand=function(self)
self:decelerate(0.3):diffusealpha(0)
end;
}
-- Secondary score.
eval_parts[#eval_parts+1] = Def.BitmapText {
Font = "_overpass 36px",
InitCommand=cmd(horizalign,center;x,_screen.cx + (grade_parts_offs);y,(_screen.cy-65)+30;diffuse,ColorDarkTone(PlayerColor(p));zoom,0.75;shadowlength,1),
OnCommand=function(self)
self:settext(GetPlScore(p, "secondary")):diffusealpha(0):sleep(0.6):decelerate(0.3):diffusealpha(1)
end;
OffCommand=function(self)
self:sleep(0.1):decelerate(0.3):diffusealpha(0)
end;
}
eval_parts[#eval_parts+1] = Def.BitmapText {
Font = "Common Condensed",
InitCommand=cmd(horizalign,center;x,_screen.cx + (grade_parts_offs);y,(_screen.cy-65)+56;diffuse,ColorDarkTone(PlayerColor(p));zoom,0.75;shadowlength,1),
OnCommand=function(self)
local record = STATSMAN:GetCurStageStats():GetPlayerStageStats(p):GetPersonalHighScoreIndex()
local hasPersonalRecord = record ~= -1
self:visible(hasPersonalRecord);
local text = string.format(THEME:GetString("ScreenEvaluation", "PersonalRecord"), record+1)
self:settext(text)
self:diffusealpha(0):sleep(0.6):decelerate(0.3):diffusealpha(1)
end;
OffCommand=function(self)
self:sleep(0.1):decelerate(0.3):diffusealpha(0)
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
-- Letter grade and associated parts.
eval_parts[#eval_parts+1] = Def.ActorFrame{
InitCommand=cmd(x,_screen.cx + grade_parts_offs;y,_screen.cy/1.91),
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();
--Containers. todo: replace with, erm... not quads
Def.Quad {
InitCommand=cmd(zoomto,190,115;diffuse,ColorMidTone(PlayerColor(p))),
OnCommand=function(self)
self:diffusealpha(0):decelerate(0.4):diffusealpha(0.5)
end,
OffCommand=cmd(decelerate,0.3;diffusealpha,0)
},
Def.Quad {
InitCommand=cmd(y,120;zoomto,190,120;diffuse,color("#fce1a1");),
OnCommand=function(self)
self:diffusealpha(0):decelerate(0.4):diffusealpha(0.3)
end,
OffCommand=cmd(decelerate,0.3;diffusealpha,0)
},
LoadActor(THEME:GetPathG("GradeDisplay", "Grade " .. p_grade)) .. {
InitCommand=cmd(zoom,0.75;);
OnCommand=function(self)
self:diffusealpha(0):zoom(1):sleep(0.63):decelerate(0.4):zoom(0.75):diffusealpha(1)
if STATSMAN:GetCurStageStats():GetPlayerStageStats(p):GetStageAward() then
self:sleep(0.1):decelerate(0.4):addy(-12);
else
self:addy(0);
end;
end;
OffCommand=cmd(decelerate,0.3;diffusealpha,0);
},
Def.BitmapText {
Font = "_roboto condensed 24px",
InitCommand=cmd(diffuse,Color.White;zoom,1;addy,38;maxwidth,160;uppercase,true;diffuse,ColorLightTone(PlayerColor(p));strokecolor,ColorDarkTone(PlayerColor(p));diffusetopedge,Color.White;),
OnCommand=function(self)
if STATSMAN:GetCurStageStats():GetPlayerStageStats(p):GetStageAward() then
self:settext(THEME:GetString( "StageAward", ToEnumShortString(STATSMAN:GetCurStageStats():GetPlayerStageStats(p):GetStageAward()) ))
self:diffusealpha(0):zoomx(0.5):sleep(1):decelerate(0.4):zoomx(1):diffusealpha(1)
end
end;
OffCommand=cmd(decelerate,0.3;diffusealpha,0);
}
}
end
c.TextTitle:settext( SongOrCourse:GetDisplayMainTitle() or nil );
c.TextSubtitle:settext( SongOrCourse:GetDisplaySubTitle() or nil );
c.TextArtist:settext( SongOrCourse:GetDisplayArtist() or nil );
t[#t+1] = eval_parts
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);
-- todo: replace.
if GAMESTATE:IsHumanPlayer(PLAYER_1) == true then
if GAMESTATE:IsCourseMode() == false then
-- Difficulty banner
local grade_parts_offs = -320
t[#t+1] = Def.ActorFrame {
InitCommand=cmd(horizalign,center;x,_screen.cx + grade_parts_offs;y,_screen.cy-98;visible,not GAMESTATE:IsCourseMode(););
OnCommand=cmd(zoomx,0.3;diffusealpha,0;sleep,0.5;decelerate,0.4;zoomx,1;diffusealpha,1;);
OffCommand=cmd(decelerate,0.4;diffusealpha,0;);
LoadFont("Common Fallback") .. {
InitCommand=cmd(zoom,1;horizalign,center;shadowlength,1);
OnCommand=cmd(playcommand,"Set";);
CurrentStepsP1ChangedMessageCommand=cmd(playcommand,"Set";);
ChangedLanguageDisplayMessageCommand=cmd(playcommand,"Set";);
SetCommand=function(self)
stepsP1 = GAMESTATE:GetCurrentSteps(PLAYER_1)
local song = GAMESTATE:GetCurrentSong();
if song then
if stepsP1 ~= nil then
local st = stepsP1:GetStepsType();
local diff = stepsP1:GetDifficulty();
local courseType = GAMESTATE:IsCourseMode() and SongOrCourse:GetCourseType() or nil;
local cdp1 = GetCustomDifficulty(st, diff, courseType);
self:settext(string.upper(THEME:GetString("CustomDifficulty",ToEnumShortString(diff))) .. " " .. stepsP1:GetMeter());
self:diffuse(ColorDarkTone(CustomDifficultyToColor(cdp1)));
else
self:settext("")
end
else
self:settext("")
end
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");
};
end;
if GAMESTATE:IsHumanPlayer(PLAYER_2) == true then
if GAMESTATE:IsCourseMode() == false then
local grade_parts_offs = 320
t[#t+1] = Def.ActorFrame {
InitCommand=cmd(horizalign,center;x,_screen.cx + grade_parts_offs;y,_screen.cy-98;visible,not GAMESTATE:IsCourseMode(););
OnCommand=cmd(zoomx,0.3;diffusealpha,0;sleep,0.5;decelerate,0.4;zoomx,1;diffusealpha,1;);
OffCommand=cmd(decelerate,0.4;diffusealpha,0;);
LoadFont("Common Fallback") .. {
InitCommand=cmd(zoom,1;horizalign,center;shadowlength,1);
OnCommand=cmd(playcommand,"Set";);
CurrentStepsP2ChangedMessageCommand=cmd(playcommand,"Set";);
ChangedLanguageDisplayMessageCommand=cmd(playcommand,"Set";);
SetCommand=function(self)
stepsP2 = GAMESTATE:GetCurrentSteps(PLAYER_2)
local song = GAMESTATE:GetCurrentSong();
if song then
if stepsP2 ~= nil then
local st = stepsP2:GetStepsType();
local diff = stepsP2:GetDifficulty();
local courseType = GAMESTATE:IsCourseMode() and SongOrCourse:GetCourseType() or nil;
local cdp2 = GetCustomDifficulty(st, diff, courseType);
self:settext(string.upper(THEME:GetString("CustomDifficulty",ToEnumShortString(diff))) .. " " .. stepsP2:GetMeter());
self:diffuse(ColorDarkTone(CustomDifficultyToColor(cdp2)));
else
self:settext("")
end
else
self:settext("")
end
end
};
};
end;
end;
t[#t+1] = Def.BitmapText {
Font = "Common Italic Condensed",
Condition=GAMESTATE:HasEarnedExtraStage();
InitCommand=cmd(horizalign,center;x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y-244;zoom,1;diffuse,color("#EC3F99");diffusebottomedge,color("#AB3468");),
OnCommand=function(self)
local text = string.upper(THEME:GetString("ScreenEvaluation", "ExtraUnlocked"))
self:settext(text)
self:diffusealpha(0):zoomx(0.7):sleep(1.3):decelerate(0.3):diffusealpha(1):zoomx(1)
end;
OffCommand=function(self)
self:sleep(0.1):decelerate(0.3):diffusealpha(0)
end;
}
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
if gameplay_pause_count > 0 then
t[#t+1]= Def.BitmapText{
Font= "_roboto condensed 24px",
Text= THEME:GetString("PauseMenu", "pause_count") .. ": " .. gameplay_pause_count,
InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_BOTTOM-100+26;);
OnCommand=function(self)
self:diffuse(color("#512232")):zoom(0.8);
self:diffusealpha(0):sleep(0.5):smooth(0.3):diffusealpha(1);
end;
OffCommand=cmd(decelerate,0.3;diffusealpha,0);
}
end
return t;
@@ -1,231 +1,3 @@
local maxSegments = 150
local t = Def.ActorFrame {};
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
return t
@@ -1,20 +1,4 @@
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"));
@@ -26,6 +10,5 @@ else
t[#t+1] = LoadActor(THEME:GetPathS( Var "LoadingScreen", "failed" ) ) .. {
StartTransitioningCommand=cmd(play);
};
end;
return t;
return t;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 23 KiB

@@ -2,7 +2,7 @@ local t = Def.ActorFrame {};
t[#t+1] = Def.Sprite {
InitCommand=cmd(Center;diffusealpha,1);
BeginCommand=cmd(LoadFromCurrentSongBackground);
OnCommand=function(self)
StartTransitioningCommand=function(self)
if PREFSMAN:GetPreference("StretchBackgrounds") then
self:SetSize(SCREEN_WIDTH,SCREEN_HEIGHT)
else
@@ -12,4 +12,8 @@ t[#t+1] = Def.Sprite {
self:diffusealpha(0)
end;
};
-- Pause menu
t[#t+1]= LoadActor(THEME:GetPathG("", "pause_menu"))
return t;
@@ -10,30 +10,4 @@ t[#t+1] = Def.Sprite {
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;
@@ -3,7 +3,7 @@ local raveChildren
local bg = Def.ActorFrame{
Def.Quad{
InitCommand=cmd(FullScreen;diffuse,color("0,0,0,0"));
OnCommand=cmd(linear,5;diffusealpha,1);
StartTransitioningCommand=cmd(linear,5;diffusealpha,1);
};
Def.ActorFrame{
@@ -32,17 +32,17 @@ local bg = Def.ActorFrame{
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);
StartTransitioningCommand=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);
StartTransitioningCommand=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);
StartTransitioningCommand=cmd(sleep,2;linear,0.5;cropbottom,0;fadebottom,0;sleep,1.75;linear,0.25;diffusealpha,0);
};
};
};
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

@@ -0,0 +1,198 @@
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);
if GAMESTATE:GetPlayMode() ~= 'PlayMode_Rave' then
for ip, pn in ipairs(GAMESTATE:GetEnabledPlayers()) do
if ShowStandardDecoration("LifeMeterBar" .. ToEnumShortString(pn)) then
local life_type = GAMESTATE:GetPlayerState(pn):GetPlayerOptions("ModsLevel_Song"):LifeSetting()
t[#t+1] = LoadActor(THEME:GetPathG(Var "LoadingScreen", "lifebar_" .. ToEnumShortString(life_type)), pn) .. {
InitCommand=function(self)
self:name("LifeMeterBar" .. ToEnumShortString(pn))
ActorUtil.LoadAllCommandsAndSetXY(self,Var "LoadingScreen")
end
}
end
end;
for ip, pn in ipairs(GAMESTATE:GetEnabledPlayers()) do
local life_x_position = string.find(pn, "P1") and SCREEN_LEFT+40 or SCREEN_RIGHT-40
local life_tween = string.find(pn, "P1") and -1 or 1
local second_tween = string.find(pn, "P1") and 1 or -1
t[#t+1] = Def.ActorFrame {
InitCommand=cmd(x,life_x_position;y,SCREEN_CENTER_Y;rotationz,-90;);
OnCommand=cmd(addx,100*life_tween;sleep,1;decelerate,0.9;addx,100*second_tween);
OffCommand=cmd(sleep,1;decelerate,0.9;addx,100*life_tween;);
LoadActor(THEME:GetPathG("LifeMeter", "bar frame")) .. {
};
Def.ActorFrame {
InitCommand=cmd(x,-207;y,0;);
LoadActor("_diffdia") .. {
OnCommand=cmd(playcommand,"Set";);
["CurrentSteps"..ToEnumShortString(pn).."ChangedMessageCommand"]=cmd(playcommand,"Set";);
SetCommand=function(self)
steps_data = GAMESTATE:GetCurrentSteps(pn)
local song = GAMESTATE:GetCurrentSong();
if song then
if steps_data ~= nil then
local st = steps_data:GetStepsType();
local diff = steps_data:GetDifficulty();
local cd = GetCustomDifficulty(st, diff);
self:diffuse(CustomDifficultyToColor(cd));
end
end
end;
};
LoadFont("StepsDisplay description") .. {
InitCommand=cmd(zoom,0.75;horizalign,center;rotationz,90);
OnCommand=cmd(playcommand,"Set";);
["CurrentSteps"..ToEnumShortString(pn).."ChangedMessageCommand"]=cmd(playcommand,"Set";);
ChangedLanguageDisplayMessageCommand=cmd(playcommand,"Set");
SetCommand=function(self)
steps_data = GAMESTATE:GetCurrentSteps(pn)
local song = GAMESTATE:GetCurrentSong();
if song then
if steps_data ~= nil then
local st = steps_data:GetStepsType();
local diff = steps_data:GetDifficulty();
local cd = GetCustomDifficulty(st, diff);
self:settext(steps_data:GetMeter()):diffuse(color("#000000")):diffusealpha(0.8);
else
self:settext("")
end
else
self:settext("")
end
end
};
};
};
end;
end;
-- Move diamonds on battle
if GAMESTATE:GetPlayMode() == 'PlayMode_Rave' then
-- P1
t[#t+1] = Def.ActorFrame {
InitCommand=cmd(x,SCREEN_CENTER_X-110;y,SCREEN_BOTTOM-55;);
LoadActor("_diffdia") .. {
OnCommand=cmd(playcommand,"Set";);
CurrentStepsP1ChangedMessageCommand=cmd(playcommand,"Set";);
SetCommand=function(self)
stepsP1 = GAMESTATE:GetCurrentSteps(PLAYER_1)
local song = GAMESTATE:GetCurrentSong();
if song then
if stepsP1 ~= nil then
local st = stepsP1:GetStepsType();
local diff = stepsP1:GetDifficulty();
local cd = GetCustomDifficulty(st, diff);
self:diffuse(CustomDifficultyToColor(cd));
end
end
end;
};
LoadFont("StepsDisplay description") .. {
InitCommand=cmd(zoom,0.75;horizalign,center;);
OnCommand=cmd(playcommand,"Set";);
CurrentStepsP1ChangedMessageCommand=cmd(playcommand,"Set";);
ChangedLanguageDisplayMessageCommand=cmd(playcommand,"Set");
SetCommand=function(self)
stepsP1 = GAMESTATE:GetCurrentSteps(PLAYER_1)
local song = GAMESTATE:GetCurrentSong();
if song then
if stepsP1 ~= nil then
local st = stepsP1:GetStepsType();
local diff = stepsP1:GetDifficulty();
local cd = GetCustomDifficulty(st, diff);
self:settext(stepsP1:GetMeter()):diffuse(color("#000000")):diffusealpha(0.8);
else
self:settext("")
end
else
self:settext("")
end
end
};
};
-- P2
t[#t+1] = Def.ActorFrame {
InitCommand=cmd(x,SCREEN_CENTER_X+110;y,SCREEN_BOTTOM-55;);
LoadActor("_diffdia") .. {
OnCommand=cmd(playcommand,"Set";);
CurrentstepsP2ChangedMessageCommand=cmd(playcommand,"Set";);
SetCommand=function(self)
stepsP2 = GAMESTATE:GetCurrentSteps(PLAYER_2)
local song = GAMESTATE:GetCurrentSong();
if song then
if stepsP2 ~= nil then
local st = stepsP2:GetStepsType();
local diff = stepsP2:GetDifficulty();
local cd = GetCustomDifficulty(st, diff);
self:diffuse(CustomDifficultyToColor(cd));
end
end
end;
};
LoadFont("StepsDisplay description") .. {
InitCommand=cmd(zoom,0.75;horizalign,center);
OnCommand=cmd(playcommand,"Set";);
CurrentstepsP2ChangedMessageCommand=cmd(playcommand,"Set";);
ChangedLanguageDisplayMessageCommand=cmd(playcommand,"Set");
SetCommand=function(self)
stepsP2 = GAMESTATE:GetCurrentSteps(PLAYER_2)
local song = GAMESTATE:GetCurrentSong();
if song then
if stepsP2 ~= nil then
local st = stepsP2:GetStepsType();
local diff = stepsP2:GetDifficulty();
local cd = GetCustomDifficulty(st, diff);
self:settext(stepsP2:GetMeter()):diffuse(color("#000000")):diffusealpha(0.8);
else
self:settext("")
end
else
self:settext("")
end
end
};
};
end;
t[#t+1] = StandardDecorationFromFileOptional("StageDisplay","StageDisplay");
return t
Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 23 KiB

@@ -0,0 +1,68 @@
--[[ Screen Filter ]]
local numPlayers = GAMESTATE:GetNumPlayersEnabled()
local center1P = PREFSMAN:GetPreference("Center1Player")
local padding = 8 -- 4px on each side
local arrowWidth = 96 -- until noteskin metrics are implemented...
local filterColor = color("#000000")
local filterAlphas = {
PlayerNumber_P1 = 1,
PlayerNumber_P2 = 1,
Default = 0,
}
local t = Def.ActorFrame{};
local style = GAMESTATE:GetCurrentStyle()
local cols = style:ColumnsPerPlayer()
local styleType = ToEnumShortString(style:GetStyleType())
local filterWidth = (arrowWidth * cols) + padding
local stepsType = style:GetStepsType()
if numPlayers == 1 then
local player = GAMESTATE:GetMasterPlayerNumber()
local pNum = (player == PLAYER_1) and 1 or 2
filterAlphas[player] = tonumber(getenv("ScreenFilterP"..pNum));
local pos;
-- [ScreenGameplay] PlayerP#Player*Side(s)X
if center1P then
pos = SCREEN_CENTER_X
elseif stepsType == "StepsType_Dance_Solo" then
pos = SCREEN_CENTER_X
else
local metricName = string.format("PlayerP%i%sX",pNum,styleType)
pos = THEME:GetMetric("ScreenGameplay",metricName)
end
t[#t+1] = Def.Quad{
Name="SinglePlayerFilter";
InitCommand=cmd(x,pos;CenterY;zoomto,filterWidth,SCREEN_HEIGHT;diffusecolor,filterColor;diffusealpha,filterAlphas[player]);
};
else
-- two players... a bit more complex.
if styleType == "TwoPlayersSharedSides" then
-- routine, just use one in the center.
local player = GAMESTATE:GetMasterPlayerNumber()
local pNum = player == PLAYER_1 and 1 or 2
local metricName = "PlayerP".. pNum .."TwoPlayersSharedSidesX"
t[#t+1] = Def.Quad{
Name="RoutineFilter";
InitCommand=cmd(x,THEME:GetMetric("ScreenGameplay",metricName);CenterY;zoomto,filterWidth,SCREEN_HEIGHT;diffusecolor,filterColor;diffusealpha,filterAlphas[player]);
};
else
-- otherwise we need two separate ones. to the pairsmobile!
for i, player in ipairs(PlayerNumber) do
local pNum = (player == PLAYER_1) and 1 or 2
filterAlphas[player] = tonumber(getenv("ScreenFilterP"..pNum));
local metricName = string.format("PlayerP%i%sX",pNum,styleType)
local pos = THEME:GetMetric("ScreenGameplay",metricName)
t[#t+1] = Def.Quad{
Name="Player"..pNum.."Filter";
InitCommand=cmd(x,pos;CenterY;zoomto,filterWidth,SCREEN_HEIGHT;diffusecolor,filterColor;diffusealpha,filterAlphas[player]);
};
end
end
end
return t;
@@ -0,0 +1,3 @@
local t = Def.ActorFrame {};
t[#t+1] = LoadActor("ScreenFilter");
return t
@@ -0,0 +1,5 @@
return Def.ActorFrame {
LoadActor(THEME:GetPathG("common bg", "base")) .. {
InitCommand=cmd(Center;zoomto,SCREEN_WIDTH,SCREEN_HEIGHT)
};
}
@@ -6,14 +6,12 @@ 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);
};
InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y-220);
Def.Quad {
InitCommand=cmd(zoomto,SCREEN_WIDTH, 56);
OnCommand=cmd(diffuse,color("#333333");diffusealpha,0.75;fadebottom,0.35);
OnCommand=function(self)
self:diffuse(ScreenColor(SCREENMAN:GetTopScreen():GetName())):diffusebottomedge(ColorDarkTone(ScreenColor(SCREENMAN:GetTopScreen():GetName()))):diffusealpha(0.9)
end
};
};
@@ -23,23 +21,20 @@ for i=1,NumColumns do
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);
InitCommand=cmd(x,SCREEN_CENTER_X+32 + 84 * (i-1);y,SCREEN_CENTER_Y-220);
LoadActor(THEME:GetPathB("_frame","3x1"),"rounded light", 18) .. {
OnCommand=cmd(diffuse,CustomDifficultyToLightColor(s);diffusealpha,0.9);
};
LoadActor(THEME:GetPathB("_frame","3x1"),"rounded gloss", 18) .. {
OnCommand=cmd(diffuse,CustomDifficultyToColor(s);diffusealpha,0.125);
};
LoadFont("Common Normal") .. {
LoadFont("StepsDisplayListRow description") .. {
InitCommand=cmd(uppercase,true;settext,CustomDifficultyToLocalizedString(s));
OnCommand=cmd(zoom,0.675;maxwidth,80/0.675;diffuse,CustomDifficultyToColor(s);shadowlength,1);
OnCommand=cmd(zoom,0.675;maxwidth,80/0.675;diffuse,CustomDifficultyToDarkColor(s););
};
};
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[#t+1] = LoadFont("Common Normal") .. {
InitCommand=cmd(settext,stString;x,SCREEN_CENTER_X-220;y,SCREEN_CENTER_Y-220;);
OnCommand=cmd(diffusebottomedge,color("0.75,0.75,0.75");shadowlength,2);
};
t.OnCommand=cmd(draworder,105);
@@ -0,0 +1 @@
Fade in
@@ -0,0 +1 @@
ScreenWithMenuElements in
@@ -0,0 +1 @@
ScreenWithMenuElements out
@@ -0,0 +1 @@
ScreenDemonstration overlay
@@ -0,0 +1 @@
ScreenWithMenuElements in
@@ -0,0 +1 @@
ScreenWithMenuElements out
@@ -0,0 +1,284 @@
local menu_height= 400
local menu_width= 250
local menu_x= {
[PLAYER_1]= _screen.w * .25,
[PLAYER_2]= _screen.w * .75,
}
local menus= {}
for i, pn in ipairs(GAMESTATE:GetHumanPlayers()) do
menus[pn]= setmetatable({}, nesty_menu_stack_mt)
end
local explanations= {}
local ready_indicators= {}
local turn_chart_mods= {
nesty_options.bool_player_mod_val("Mirror"),
nesty_options.bool_player_mod_val("Backwards"),
nesty_options.bool_player_mod_val("Left"),
nesty_options.bool_player_mod_val("Right"),
nesty_options.bool_player_mod_val("Shuffle"),
nesty_options.bool_player_mod_val("SoftShuffle"),
nesty_options.bool_player_mod_val("SuperShuffle"),
}
local removal_chart_mods= {
nesty_options.bool_player_mod_val("NoHolds"),
nesty_options.bool_player_mod_val("NoRolls"),
nesty_options.bool_player_mod_val("NoMines"),
nesty_options.bool_player_mod_val("HoldRolls"),
nesty_options.bool_player_mod_val("NoJumps"),
nesty_options.bool_player_mod_val("NoHands"),
nesty_options.bool_player_mod_val("NoLifts"),
nesty_options.bool_player_mod_val("NoFakes"),
nesty_options.bool_player_mod_val("NoQuads"),
nesty_options.bool_player_mod_val("NoStretch"),
}
local insertion_chart_mods= {
nesty_options.bool_player_mod_val("Little"),
nesty_options.bool_player_mod_val("Wide"),
nesty_options.bool_player_mod_val("Big"),
nesty_options.bool_player_mod_val("Quick"),
nesty_options.bool_player_mod_val("BMRize"),
nesty_options.bool_player_mod_val("Skippy"),
nesty_options.bool_player_mod_val("Mines"),
nesty_options.bool_player_mod_val("Echo"),
nesty_options.bool_player_mod_val("Stomp"),
nesty_options.bool_player_mod_val("Planted"),
nesty_options.bool_player_mod_val("Floored"),
nesty_options.bool_player_mod_val("Twister"),
}
local chart_mods= {
nesty_options.submenu("turn_chart_mods", turn_chart_mods),
nesty_options.submenu("removal_chart_mods", removal_chart_mods),
nesty_options.submenu("insertion_chart_mods", insertion_chart_mods),
}
local gameplay_options= {
nesty_options.bool_config_val(player_config, "ComboUnderField"),
nesty_options.bool_config_val(player_config, "FlashyCombo"),
nesty_options.bool_config_val(player_config, "GameplayShowStepsDisplay"),
nesty_options.bool_config_val(player_config, "GameplayShowScore"),
nesty_options.bool_config_val(player_config, "JudgmentUnderField"),
nesty_options.bool_config_val(player_config, "Protiming"),
}
-- The time life bar doesn't work sensibly outside the survival courses, so
-- keep it out of the menu.
local life_type_enum= {"LifeType_Bar", "LifeType_Battery"}
local life_options= {
nesty_options.enum_player_mod_single_val("bar_type", "LifeType_Bar", "LifeSetting"),
nesty_options.enum_player_mod_single_val("battery_type", "LifeType_Battery", "LifeSetting"),
nesty_options.enum_player_mod_single_val("normal_drain", "DrainType_Normal", "DrainSetting"),
nesty_options.enum_player_mod_single_val("no_recover", "DrainType_NoRecover", "DrainSetting"),
nesty_options.enum_player_mod_single_val("sudden_death", "DrainType_SuddenDeath", "DrainSetting"),
nesty_options.enum_player_mod_single_val("fail_immediate", "FailType_Immediate", "FailSetting"),
nesty_options.enum_player_mod_single_val("fail_immediate_continue", "FailType_ImmediateContinue", "FailSetting"),
nesty_options.enum_player_mod_single_val("fail_end_of_song", "FailType_EndOfSong", "FailSetting"),
nesty_options.enum_player_mod_single_val("fail_off", "FailType_Off", "FailSetting"),
nesty_options.float_player_mod_val_new("BatteryLives", 1, 2, 1, 10, 4),
}
-- I suppose now would be a good time to mention that, since the float menu code ...thingy doesn't rely on powers of 10 anymore,
-- the values passed in will be different.
local base_options= {
notefield_prefs_speed_type_menu(),
notefield_prefs_speed_mod_menu(),
--Turns out the music rate can't handle values higher than 3!
nesty_options.float_song_mod_val_new("MusicRate", 0.1, 1, .1, 3, 1),
nesty_options.float_song_mod_toggle_val("Haste", 1, 0),
notefield_perspective_menu(),
nesty_options.float_config_toggle_val(notefield_prefs_config, "reverse", -1, 1),
nesty_options.float_config_val_new(notefield_prefs_config, "zoom", 0.1, 1),
nesty_options.submenu("chart_mods", chart_mods),
{name= "noteskin", translatable= true, menu= nesty_option_menus.noteskins},
{name= "shown_noteskins", translatable= true, menu= nesty_option_menus.shown_noteskins, args= {}},
nesty_options.bool_config_val(notefield_prefs_config, "hidden"),
nesty_options.bool_config_val(notefield_prefs_config, "sudden"),
advanced_notefield_prefs_menu(),
nesty_options.submenu("gameplay_options", gameplay_options),
nesty_options.submenu("life_options", life_options),
nesty_options.bool_song_mod_val("AssistClap"),
nesty_options.bool_song_mod_val("AssistMetronome"),
nesty_options.bool_song_mod_val("StaticBackground"),
nesty_options.bool_song_mod_val("RandomBGOnly"),
nesty_options.float_config_val_new(player_config, "ScreenFilter", 0.1, 0.5, 0, 1),
get_notefield_mods_toggle_menu(true, true),
{name= "reload_noteskins", translatable= true, type= "action",
execute= function() NOTESKIN:reload_skins() end},
}
local player_ready= {}
local function exit_if_both_ready()
for i, pn in ipairs(GAMESTATE:GetHumanPlayers()) do
if not player_ready[pn] then return end
end
SCREENMAN:GetTopScreen():StartTransitioningScreen("SM_GoToNextScreen")
end
local prev_explanation= {}
local function update_explanation(pn)
local cursor_item= menus[pn]:get_cursor_item()
if cursor_item then
local new_expl= cursor_item.name or cursor_item.text
local expl_com= "change_explanation"
if cursor_item.explanation then
new_expl= cursor_item.explanation
expl_com= "translated_explanation"
end
if new_expl ~= prev_explanation[pn] then
prev_explanation[pn]= new_expl
explanations[pn]:playcommand(expl_com, {text= new_expl})
end
end
end
local function input(event)
local pn= event.PlayerNumber
if not pn then return end
if not menus[pn] then return end
if menu_stack_generic_input(menus, event)
and event.type == "InputEventType_FirstPress" then
if event.GameButton == "Back" then
SCREENMAN:GetTopScreen():StartTransitioningScreen("SM_GoToPrevScreen")
else
player_ready[pn]= true
ready_indicators[pn]:playcommand("show_ready")
exit_if_both_ready()
end
else
if player_ready[pn] and not menus[pn]:can_exit_screen() then
player_ready[pn]= false
ready_indicators[pn]:playcommand("hide_ready")
end
end
update_explanation(pn)
end
local frame= Def.ActorFrame{
OnCommand= function(self)
SCREENMAN:GetTopScreen():AddInputCallback(input)
for pn, menu in pairs(menus) do
menu:push_menu_stack(nesty_option_menus.menu, base_options, "play_song")
menu:update_cursor_pos()
update_explanation(pn)
end
end,
}
local item_params= {
text_commands= {
Font= "Common Condensed", OnCommand= function(self)
self:diffuse(color("#3D1D23")):diffusealpha(0):decelerate(0.2):diffusealpha(1)
end,
OffCommand=function(self)
self:smooth(0.3):diffusealpha(0)
end,
},
text_width= .7,
value_text_commands= {
Font= "Common Condensed", OnCommand= function(self)
self:diffuse(color("#AC214A")):diffusealpha(0):decelerate(0.2):diffusealpha(1)
end,
OffCommand=function(self)
self:smooth(0.3):diffusealpha(0)
end,
},
value_image_commands= {
OnCommand= function(self)
self:diffusealpha(0):smooth(0.3):diffusealpha(1)
end,
OffCommand=function(self)
self:smooth(0.3):diffusealpha(0)
end,
},
value_width= .25,
type_images= {
bool= THEME:GetPathG("", "menu_icons/bool"),
choice= THEME:GetPathG("", "menu_icons/bool"),
menu= THEME:GetPathG("", "menu_icons/menu"),
},
}
for pn, menu in pairs(menus) do
frame[#frame+1]= LoadActor(
THEME:GetPathG("ScreenOptions", "halfpage")) .. {
InitCommand= function(self)
self:xy(menu_x[pn], 360)
end;
OnCommand=function(self)
self:diffusealpha(0):zoomx(0.8):decelerate(0.3):diffusealpha(1):zoomx(1)
end;
OffCommand=function(self)
self:decelerate(0.3):diffusealpha(0)
end;
}
frame[#frame+1]= menu:create_actors{
x= menu_x[pn], y= 120, width= menu_width, height= menu_height,
translation_section= "notefield_options",
num_displays= 1, pn= pn, el_height= 36,
menu_sounds= {
pop= THEME:GetPathS("Common", "Cancel"),
push= THEME:GetPathS("_common", "row"),
act= THEME:GetPathS("Common", "start"),
move= THEME:GetPathS("Common", "value"),
move_up= THEME:GetPathS("Common", "value"),
move_down= THEME:GetPathS("Common", "value"),
inc= THEME:GetPathS("_switch", "up"),
dec= THEME:GetPathS("_switch", "down"),
},
display_params= {
el_zoom= 0.8, item_params= item_params, item_mt= nesty_items.value, heading_height = 48,
on= function(self)
self:diffusealpha(0):decelerate(0.2):diffusealpha(1)
end,
off= function(self)
self:decelerate(0.2):diffusealpha(0)
end,
},
}
frame[#frame+1]= Def.BitmapText{
Font= "Common Normal", InitCommand= function(self)
explanations[pn]= self
self:xy(menu_x[pn] - (menu_width / 2), _screen.cy+154)
:diffuse(ColorDarkTone((PlayerColor(pn)))):horizalign(left):vertalign(top)
:wrapwidthpixels(menu_width / .8):zoom(.75)
:horizalign(left)
end,
change_explanationCommand= function(self, param)
local text= ""
if THEME:HasString("notefield_explanations", param.text) then
text= THEME:GetString("notefield_explanations", param.text)
end
self:playcommand("translated_explanation", {text= text})
end,
translated_explanationCommand= function(self, param)
self:stoptweening():settext(param.text):cropright(1):linear(.5):cropright(0)
end,
}
frame[#frame+1]= Def.BitmapText{
Font= "Common Condensed", Text= "READY!", InitCommand= function(self)
ready_indicators[pn]= self
self:xy(menu_x[pn], 146):zoom(1.5):diffuse(Color.Green):strokecolor(color("#2E540F")):diffusealpha(0)
end,
show_readyCommand= function(self)
self:stoptweening():decelerate(.5):diffusealpha(1)
end,
hide_readyCommand= function(self)
self:stoptweening():accelerate(.5):diffusealpha(0)
end,
}
local metrics_name = "PlayerNameplate" .. ToEnumShortString(pn)
frame[#frame+1] = LoadActor(
THEME:GetPathG("ScreenPlayerOptions", "PlayerNameplate"), pn) .. {
InitCommand=function(self)
self:name(metrics_name)
ActorUtil.LoadAllCommandsAndSetXY(self,"ScreenPlayerOptions")
self:x(menu_x[pn])
end
}
end
return frame
@@ -0,0 +1 @@
Online background
@@ -0,0 +1 @@
Online background
@@ -1,6 +1,418 @@
local curStage = GAMESTATE:GetCurrentStage();
local curStageIndex = GAMESTATE:GetCurrentStageIndex();
local t = LoadFallbackB();
t[#t+1] = StandardDecorationFromFileOptional("BPMLabel","BPMLabel");
t[#t+1] = StandardDecorationFromFileOptional("BPMDisplay","BPMDisplay");
t[#t+1] = StandardDecorationFromFileOptional("DifficultyDisplay","DifficultyDisplay");
local function PercentScore(pn)
local t = LoadFont("_overpass Score")..{
InitCommand=cmd(zoom,1;diffuse,Color("Black");diffusealpha,0.75;);
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);
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
-- Genre/Artist data
t[#t+1] = LoadActor(THEME:GetPathG("ScreenSelectMusic", "info pane")) .. {
InitCommand=cmd(horizalign,center;x,SCREEN_CENTER_X-228;y,SCREEN_CENTER_Y-75;zoom,1;);
OnCommand=function(self)
self:diffuse(ColorMidTone(StageToColor(curStage)));
self:zoomx(0):diffusealpha(0):decelerate(0.3):zoomx(1):diffusealpha(1);
end;
OffCommand=function(self)
self:sleep(0.3):decelerate(0.15):zoomx(0):diffusealpha(0);
end;
};
t[#t+1] = Def.ActorFrame {
InitCommand=cmd(x,SCREEN_CENTER_X-330+6-138;draworder,126);
OnCommand=cmd(diffusealpha,0;smooth,0.3;diffusealpha,1;);
OffCommand=cmd(smooth,0.3;diffusealpha,0;);
-- Length
StandardDecorationFromFileOptional("SongTime","SongTime") .. {
SetCommand=function(self)
local curSelection = nil;
local length = 0.0;
if GAMESTATE:IsCourseMode() then
curSelection = GAMESTATE:GetCurrentCourse();
self:queuecommand("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:queuecommand("Reset");
if curSelection then
length = curSelection:MusicLengthSeconds();
if curSelection:IsLong() then
self:queuecommand("Long");
elseif curSelection:IsMarathon() then
self:queuecommand("Marathon");
else
self:queuecommand("Reset");
end
else
length = 0.0;
self:queuecommand("Reset");
end;
end;
self:settext( SecondsToMSS(length) );
end;
CurrentSongChangedMessageCommand=cmd(queuecommand,"Set");
CurrentCourseChangedMessageCommand=cmd(queuecommand,"Set");
CurrentTrailP1ChangedMessageCommand=cmd(queuecommand,"Set");
CurrentTrailP2ChangedMessageCommand=cmd(queuecommand,"Set");
};
};
-- Course count and type
t[#t+1] = Def.ActorFrame {
InitCommand=cmd(x,SCREEN_CENTER_X-200;draworder,126);
OnCommand=cmd(diffusealpha,0;smooth,0.3;diffusealpha,1;);
OffCommand=cmd(smooth,0.2;diffusealpha,0;);
LoadFont("Common Condensed") .. {
InitCommand=cmd(horizalign,right;zoom,1.0;y,SCREEN_CENTER_Y-78+2;maxwidth,180;diffuse,color("#DFE2E9");visible,GAMESTATE:IsCourseMode(););
CurrentCourseChangedMessageCommand=cmd(queuecommand,"Set");
ChangedLanguageDisplayMessageCommand=cmd(queuecommand,"Set");
SetCommand=function(self)
local course = GAMESTATE:GetCurrentCourse();
if course then
self:settext(course:GetEstimatedNumStages() .. " songs");
self:queuecommand("Refresh");
else
self:settext("");
self:queuecommand("Refresh");
end
end;
};
};
t[#t+1] = Def.ActorFrame {
InitCommand=cmd(x,SCREEN_CENTER_X+5;draworder,126);
OnCommand=cmd(diffusealpha,0;smooth,0.3;diffusealpha,1;);
OffCommand=cmd(smooth,0.2;diffusealpha,0;);
LoadFont("Common Condensed") .. {
InitCommand=cmd(horizalign,right;zoom,1.0;y,SCREEN_CENTER_Y-78+2;maxwidth,180;diffuse,color("#DFE2E9");visible,GAMESTATE:IsCourseMode(););
CurrentCourseChangedMessageCommand=cmd(queuecommand,"Set");
ChangedLanguageDisplayMessageCommand=cmd(queuecommand,"Set");
SetCommand=function(self)
local course = GAMESTATE:GetCurrentCourse();
if course then
self:settext(CourseTypeToLocalizedString(course:GetCourseType()));
self:queuecommand("Refresh");
else
self:settext("");
self:queuecommand("Refresh");
end
end;
};
};
if not GAMESTATE:IsCourseMode() then
-- P1 Difficulty Pane
t[#t+1] = Def.ActorFrame {
InitCommand=cmd(visible,GAMESTATE:IsHumanPlayer(PLAYER_1);horizalign,center;x,SCREEN_CENTER_X-210-32;y,SCREEN_CENTER_Y+230+8;);
OnCommand=cmd(zoomy,0.8;diffusealpha,0;smooth,0.4;diffusealpha,1;zoomy,1);
PlayerJoinedMessageCommand=function(self,param)
if param.Player == PLAYER_1 then
(cmd(visible,true;diffusealpha,0;linear,0.3;diffusealpha,1))(self);
end;
end;
OffCommand=cmd(decelerate,0.3;zoomy,0.8;diffusealpha,0);
LoadActor(THEME:GetPathG("ScreenSelectMusic", "pane background")) .. {
CurrentStepsP1ChangedMessageCommand=cmd(queuecommand,"Set";);
PlayerJoinedMessageCommand=cmd(queuecommand,"Set";diffusealpha,0;decelerate,0.3;diffusealpha,1;);
ChangedLanguageDisplayMessageCommand=cmd(queuecommand,"Set");
SetCommand=function(self)
stepsP1 = GAMESTATE:GetCurrentSteps(PLAYER_1)
local song = GAMESTATE:GetCurrentSong();
if song then
if stepsP1 ~= nil then
local st = stepsP1:GetStepsType();
local diff = stepsP1:GetDifficulty();
local courseType = GAMESTATE:IsCourseMode() and SongOrCourse:GetCourseType() or nil;
local cd = GetCustomDifficulty(st, diff, courseType);
self:finishtweening():linear(0.2):diffuse(ColorLightTone(CustomDifficultyToColor(cd)));
else
self:diffuse(color("#666666"));
end
else
self:diffuse(color("#666666"));
end
end
};
LoadFont("StepsDisplay meter") .. {
InitCommand=cmd(zoom,1.25;diffuse,color("#000000");addx,-143;addy,13);
OnCommand=cmd(diffusealpha,0;smooth,0.2;diffusealpha,0.75;);
OffCommand=cmd(linear,0.3;diffusealpha,0;);
CurrentStepsP1ChangedMessageCommand=cmd(queuecommand,"Set";);
PlayerJoinedMessageCommand=cmd(queuecommand,"Set";diffusealpha,0;linear,0.3;diffusealpha,0.75;);
ChangedLanguageDisplayMessageCommand=cmd(queuecommand,"Set");
SetCommand=function(self)
stepsP1 = GAMESTATE:GetCurrentSteps(PLAYER_1)
local song = GAMESTATE:GetCurrentSong();
if song then
if stepsP1 ~= nil then
local st = stepsP1:GetStepsType();
local diff = stepsP1:GetDifficulty();
local courseType = GAMESTATE:IsCourseMode() and SongOrCourse:GetCourseType() or nil;
local cd = GetCustomDifficulty(st, diff, courseType);
self:settext(stepsP1:GetMeter())
else
self:settext("")
end
else
self:settext("")
end
end
};
LoadFont("Common Italic Condensed") .. {
InitCommand=cmd(uppercase,true;zoom,1;addy,-40;addx,-143;diffuse,color("#000000");maxwidth,115;);
OnCommand=cmd(diffusealpha,0;smooth,0.2;diffusealpha,0.75;);
OffCommand=cmd(linear,0.3;diffusealpha,0;);
CurrentStepsP1ChangedMessageCommand=cmd(queuecommand,"Set";);
PlayerJoinedMessageCommand=cmd(queuecommand,"Set";diffusealpha,0;linear,0.3;diffusealpha,0.75;);
ChangedLanguageDisplayMessageCommand=cmd(queuecommand,"Set");
SetCommand=function(self)
stepsP1 = GAMESTATE:GetCurrentSteps(PLAYER_1)
local song = GAMESTATE:GetCurrentSong();
if song then
if stepsP1 ~= nil then
local st = stepsP1:GetStepsType();
local diff = stepsP1:GetDifficulty();
local courseType = GAMESTATE:IsCourseMode() and SongOrCourse:GetCourseType() or nil;
local cd = GetCustomDifficulty(st, diff, courseType);
self:settext(THEME:GetString("CustomDifficulty",ToEnumShortString(diff)));
else
self:settext("")
end
else
self:settext("")
end
end
};
LoadFont("Common Normal") .. {
InitCommand=cmd(uppercase,true;zoom,0.75;addy,-20;addx,-143;diffuse,color("#000000"););
OnCommand=cmd(diffusealpha,0;smooth,0.2;diffusealpha,0.75;);
OffCommand=cmd(linear,0.3;diffusealpha,0;);
CurrentStepsP1ChangedMessageCommand=cmd(queuecommand,"Set";);
PlayerJoinedMessageCommand=cmd(queuecommand,"Set";diffusealpha,0;linear,0.3;diffusealpha,0.75;);
ChangedLanguageDisplayMessageCommand=cmd(queuecommand,"Set");
SetCommand=function(self)
stepsP1 = GAMESTATE:GetCurrentSteps(PLAYER_1)
local song = GAMESTATE:GetCurrentSong();
if song then
if stepsP1 ~= nil then
local st = stepsP1:GetStepsType();
local diff = stepsP1:GetDifficulty();
local courseType = GAMESTATE:IsCourseMode() and SongOrCourse:GetCourseType() or nil;
local cd = GetCustomDifficulty(st, diff, courseType);
self:settext(THEME:GetString("StepsType",ToEnumShortString(st)));
else
self:settext("")
end
else
self:settext("")
end
end
};
};
-- P2 Difficulty Pane
t[#t+1] = Def.ActorFrame {
InitCommand=cmd(visible,GAMESTATE:IsHumanPlayer(PLAYER_2);horizalign,center;x,SCREEN_CENTER_X+210+32;y,SCREEN_CENTER_Y+230+8;);
OnCommand=cmd(zoomy,0.8;diffusealpha,0;smooth,0.4;diffusealpha,1;zoomy,1);
PlayerJoinedMessageCommand=function(self,param)
if param.Player == PLAYER_2 then
(cmd(visible,true;diffusealpha,0;linear,0.3;diffusealpha,1))(self);
end;
end;
OffCommand=cmd(decelerate,0.3;zoomy,0.8;diffusealpha,0);
LoadActor(THEME:GetPathG("ScreenSelectMusic", "pane background")) .. {
InitCommand=cmd(zoomx,-1;);
CurrentStepsP2ChangedMessageCommand=cmd(queuecommand,"Set";);
PlayerJoinedMessageCommand=cmd(queuecommand,"Set";diffusealpha,0;decelerate,0.3;diffusealpha,1;);
ChangedLanguageDisplayMessageCommand=cmd(queuecommand,"Set");
SetCommand=function(self)
stepsP2 = GAMESTATE:GetCurrentSteps(PLAYER_2)
local song = GAMESTATE:GetCurrentSong();
if song then
if stepsP2 ~= nil then
local st = stepsP2:GetStepsType();
local diff = stepsP2:GetDifficulty();
local courseType = GAMESTATE:IsCourseMode() and SongOrCourse:GetCourseType() or nil;
local cd = GetCustomDifficulty(st, diff, courseType);
self:finishtweening():linear(0.2):diffuse(ColorLightTone(CustomDifficultyToColor(cd)));
else
self:diffuse(color("#666666"));
end
else
self:diffuse(color("#666666"));
end
end
};
LoadFont("StepsDisplay meter") .. {
InitCommand=cmd(zoom,1.25;diffuse,color("#000000");addx,143;addy,13);
OnCommand=cmd(diffusealpha,0;smooth,0.2;diffusealpha,0.75;);
OffCommand=cmd(linear,0.3;diffusealpha,0;);
CurrentStepsP2ChangedMessageCommand=cmd(queuecommand,"Set";);
PlayerJoinedMessageCommand=cmd(queuecommand,"Set";diffusealpha,0;linear,0.3;diffusealpha,0.75;);
ChangedLanguageDisplayMessageCommand=cmd(queuecommand,"Set");
SetCommand=function(self)
stepsP2 = GAMESTATE:GetCurrentSteps(PLAYER_2)
local song = GAMESTATE:GetCurrentSong();
if song then
if stepsP2 ~= nil then
local st = stepsP2:GetStepsType();
local diff = stepsP2:GetDifficulty();
local courseType = GAMESTATE:IsCourseMode() and SongOrCourse:GetCourseType() or nil;
local cd = GetCustomDifficulty(st, diff, courseType);
self:settext(stepsP2:GetMeter())
else
self:settext("")
end
else
self:settext("")
end
end
};
LoadFont("Common Italic Condensed") .. {
InitCommand=cmd(uppercase,true;zoom,1;addy,-40;addx,143;diffuse,color("#000000");maxwidth,115;);
OnCommand=cmd(diffusealpha,0;smooth,0.2;diffusealpha,0.75;);
OffCommand=cmd(linear,0.3;diffusealpha,0;);
CurrentStepsP2ChangedMessageCommand=cmd(queuecommand,"Set";);
PlayerJoinedMessageCommand=cmd(queuecommand,"Set";diffusealpha,0;linear,0.3;diffusealpha,0.75;);
ChangedLanguageDisplayMessageCommand=cmd(queuecommand,"Set");
SetCommand=function(self)
stepsP2 = GAMESTATE:GetCurrentSteps(PLAYER_2)
local song = GAMESTATE:GetCurrentSong();
if song then
if stepsP2 ~= nil then
local st = stepsP2:GetStepsType();
local diff = stepsP2:GetDifficulty();
local courseType = GAMESTATE:IsCourseMode() and SongOrCourse:GetCourseType() or nil;
local cd = GetCustomDifficulty(st, diff, courseType);
self:settext(THEME:GetString("CustomDifficulty",ToEnumShortString(diff)));
else
self:settext("")
end
else
self:settext("")
end
end
};
LoadFont("Common Normal") .. {
InitCommand=cmd(uppercase,true;zoom,0.75;addy,-20;addx,143;diffuse,color("#000000"););
OnCommand=cmd(diffusealpha,0;smooth,0.2;diffusealpha,0.75;);
OffCommand=cmd(linear,0.3;diffusealpha,0;);
CurrentStepsP2ChangedMessageCommand=cmd(queuecommand,"Set";);
PlayerJoinedMessageCommand=cmd(queuecommand,"Set";diffusealpha,0;linear,0.3;diffusealpha,0.75;);
ChangedLanguageDisplayMessageCommand=cmd(queuecommand,"Set");
SetCommand=function(self)
stepsP2 = GAMESTATE:GetCurrentSteps(PLAYER_2)
local song = GAMESTATE:GetCurrentSong();
if song then
if stepsP2 ~= nil then
local st = stepsP2:GetStepsType();
local diff = stepsP2:GetDifficulty();
local courseType = GAMESTATE:IsCourseMode() and SongOrCourse:GetCourseType() or nil;
local cd = GetCustomDifficulty(st, diff, courseType);
self:settext(THEME:GetString("StepsType",ToEnumShortString(st)));
else
self:settext("")
end
else
self:settext("")
end
end
};
};
t[#t+1] = StandardDecorationFromFileOptional("PaneDisplayTextP1","PaneDisplayTextP1");
t[#t+1] = StandardDecorationFromFileOptional("PaneDisplayTextP2","PaneDisplayTextP2");
t[#t+1] = StandardDecorationFromTable("PercentScore"..ToEnumShortString(PLAYER_1), PercentScore(PLAYER_1));
t[#t+1] = StandardDecorationFromTable("PercentScore"..ToEnumShortString(PLAYER_2), PercentScore(PLAYER_2));
end;
-- BPMDisplay
t[#t+1] = Def.ActorFrame {
InitCommand=cmd(draworder,126;visible,not GAMESTATE:IsCourseMode(););
OnCommand=cmd(diffusealpha,0;smooth,0.3;diffusealpha,1;);
OffCommand=cmd(linear,0.3;diffusealpha,0;);
LoadFont("Common Condensed") .. {
InitCommand=cmd(horizalign,right;x,SCREEN_CENTER_X-198+69-66;y,SCREEN_CENTER_Y-78+2;diffuse,color("#512232");horizalign,right;visible,not GAMESTATE:IsCourseMode(););
OnCommand=cmd(queuecommand,"Set");
ChangedLanguageDisplayMessageCommand=cmd(queuecommand,"Set");
SetCommand=function(self)
self:settext("BPM"):diffuse(ColorLightTone(StageToColor(curStage)));
end;
};
StandardDecorationFromFileOptional("BPMDisplay","BPMDisplay");
};
return t;
Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

@@ -0,0 +1,19 @@
local t = Def.ActorFrame {};
t[#t+1] = Def.ActorFrame {
FOV=90;
InitCommand=cmd(Center);
Def.Quad {
InitCommand=cmd(scaletoclipped,SCREEN_WIDTH,SCREEN_HEIGHT);
OnCommand=cmd(diffuse,color("#fdbe28");diffusebottomedge,color("#f67849"));
};
Def.ActorFrame {
InitCommand=cmd(diffusealpha,0.2;);
LoadActor("_checkerboard") .. {
InitCommand=cmd(rotationy,0;rotationz,0;rotationx,-90/4*3.5;zoomto,SCREEN_WIDTH*2,SCREEN_HEIGHT*2;customtexturerect,0,0,SCREEN_WIDTH*4/256,SCREEN_HEIGHT*4/256);
OnCommand=cmd(texcoordvelocity,0,0.25;diffuse,color("#ffffff");fadetop,1);
};
};
};
return t;
@@ -0,0 +1 @@
ScreenOptionsService In
@@ -0,0 +1 @@
ScreenOptionsService Out
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

@@ -0,0 +1,24 @@
local t = Def.ActorFrame {};
t[#t+1] = Def.ActorFrame {
Def.Sprite {
Name="animation",
Texture="LoadScreen diamond 5x2.png",
InitCommand=function(self)
self:SetAllStateDelays(0.1):diffusealpha(1):diffuse(color("#6248A7")):Center()
end,
OnCommand=function(self)
self:zoom(0):decelerate(0.25):zoom(0.5):sleep(0.5):decelerate(0.25):zoom(0)
end
};
};
t[#t+1] = Def.Actor {
BeginCommand=function(self)
if SCREENMAN:GetTopScreen():HaveProfileToLoad() then self:sleep(1); end;
self:queuecommand("Load");
end;
LoadCommand=function() SCREENMAN:GetTopScreen():Continue(); end;
};
return t;
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

@@ -0,0 +1,24 @@
local t = Def.ActorFrame {};
t[#t+1] = Def.ActorFrame {
Def.Sprite {
Name="animation",
Texture="LoadScreen diamond 5x2.png",
InitCommand=function(self)
self:SetAllStateDelays(0.1):diffusealpha(1):diffuse(color("#95326F")):Center()
end,
OnCommand=function(self)
self:zoom(0):decelerate(0.25):zoom(0.5):sleep(0.5):decelerate(0.25):zoom(0)
end
};
};
t[#t+1] = Def.Actor {
BeginCommand=function(self)
if SCREENMAN:GetTopScreen():HaveProfileToSave() then self:sleep(1); end;
self:queuecommand("Load");
end;
LoadCommand=function() SCREENMAN:GetTopScreen():Continue(); end;
};
return t;
@@ -0,0 +1,9 @@
local t = Def.ActorFrame {};
t[#t+1] = Def.Quad{
InitCommand=cmd(scaletocover,-SCREEN_WIDTH*2,SCREEN_TOP,SCREEN_WIDTH*2,SCREEN_BOTTOM;diffuse,color("0,0,0,0.5"));
OnCommand=cmd(diffusealpha,0;smooth,0.2;diffusealpha,0.5;);
OffCommand=cmd(smooth,0.2;diffusealpha,0;);
};
return t
@@ -0,0 +1 @@
Online background
Binary file not shown.

After

Width:  |  Height:  |  Size: 1012 B

@@ -1,30 +1,10 @@
local curStage = GAMESTATE:GetCurrentStage();
local curStageIndex = GAMESTATE:GetCurrentStageIndex();
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);
local t = LoadFont("_overpass Score")..{
InitCommand=cmd(zoom,1;diffuse,Color("Black");diffusealpha,0.75;);
BeginCommand=cmd(playcommand,"Set");
SetCommand=function(self)
local SongOrCourse, StepsOrTrail;
@@ -43,8 +23,6 @@ local function PercentScore(pn)
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
@@ -87,49 +65,48 @@ local function PercentScore(pn)
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;
-- Banner underlay
-- t[#t+1] = Def.ActorFrame {
-- InitCommand=cmd(x,SCREEN_CENTER_X-230;draworder,125);
-- OffCommand=cmd(smooth,0.2;diffusealpha,0;);
-- Def.Quad {
-- InitCommand=cmd(zoomto,468,196;diffuse,color("#fce1a1");diffusealpha,0.4;vertalign,top;y,SCREEN_CENTER_Y-230;);
-- };
-- };
-- Banner
t[#t+1] = LoadActor(THEME:GetPathG("ScreenSelectMusic", "banner overlay")) .. {
InitCommand=cmd(zoom,1;x,SCREEN_CENTER_X-228;y,SCREEN_CENTER_Y-165-11;draworder,47);
OnCommand=cmd(zoomy,0;decelerate,0.3;zoomy,1;);
OffCommand=cmd(decelerate,0.15;zoomx,0;);
};
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") .. {
}; --]]
-- Genre/Artist data
t[#t+1] = LoadActor(THEME:GetPathG("ScreenSelectMusic", "info pane")) .. {
InitCommand=cmd(horizalign,center;x,SCREEN_CENTER_X-228;y,SCREEN_CENTER_Y-75;zoom,1;);
OnCommand=function(self)
self:diffuse(ColorMidTone(StageToColor(curStage)));
self:zoomx(0):diffusealpha(0):decelerate(0.3):zoomx(1):diffusealpha(1);
end;
OffCommand=function(self)
self:sleep(0.3):decelerate(0.15):zoomx(0):diffusealpha(0);
end;
};
t[#t+1] = StandardDecorationFromFileOptional("SongTime","SongTime") .. {
t[#t+1] = Def.ActorFrame {
InitCommand=cmd(x,SCREEN_CENTER_X-330+6-138;draworder,126);
OnCommand=cmd(diffusealpha,0;smooth,0.3;diffusealpha,1;);
OffCommand=cmd(smooth,0.3;diffusealpha,0;);
-- Length
StandardDecorationFromFileOptional("SongTime","SongTime") .. {
SetCommand=function(self)
local curSelection = nil;
local length = 0.0;
if GAMESTATE:IsCourseMode() then
curSelection = GAMESTATE:GetCurrentCourse();
self:playcommand("Reset");
self:queuecommand("Reset");
if curSelection then
local trail = GAMESTATE:GetCurrentTrail(GAMESTATE:GetMasterPlayerNumber());
if trail then
@@ -142,158 +119,344 @@ t[#t+1] = StandardDecorationFromFileOptional("SongTime","SongTime") .. {
end;
else
curSelection = GAMESTATE:GetCurrentSong();
self:playcommand("Reset");
self:queuecommand("Reset");
if curSelection then
length = curSelection:MusicLengthSeconds();
if curSelection:IsLong() then
self:playcommand("Long");
self:queuecommand("Long");
elseif curSelection:IsMarathon() then
self:playcommand("Marathon");
self:queuecommand("Marathon");
else
self:playcommand("Reset");
self:queuecommand("Reset");
end
else
length = 0.0;
self:playcommand("Reset");
self:queuecommand("Reset");
end;
end;
self:settext( SecondsToMSS(length) );
end;
CurrentSongChangedMessageCommand=cmd(playcommand,"Set");
CurrentCourseChangedMessageCommand=cmd(playcommand,"Set");
CurrentTrailP1ChangedMessageCommand=cmd(playcommand,"Set");
CurrentTrailP2ChangedMessageCommand=cmd(playcommand,"Set");
}
CurrentSongChangedMessageCommand=cmd(queuecommand,"Set");
CurrentCourseChangedMessageCommand=cmd(queuecommand,"Set");
CurrentTrailP1ChangedMessageCommand=cmd(queuecommand,"Set");
CurrentTrailP2ChangedMessageCommand=cmd(queuecommand,"Set");
};
};
-- Course count and type
t[#t+1] = Def.ActorFrame {
InitCommand=cmd(x,SCREEN_CENTER_X-200;draworder,126);
OnCommand=cmd(diffusealpha,0;smooth,0.3;diffusealpha,1;);
OffCommand=cmd(smooth,0.2;diffusealpha,0;);
LoadFont("Common Condensed") .. {
InitCommand=cmd(horizalign,right;zoom,1.0;y,SCREEN_CENTER_Y-78+2;maxwidth,180;diffuse,color("#DFE2E9");visible,GAMESTATE:IsCourseMode(););
CurrentCourseChangedMessageCommand=cmd(queuecommand,"Set");
ChangedLanguageDisplayMessageCommand=cmd(queuecommand,"Set");
SetCommand=function(self)
local course = GAMESTATE:GetCurrentCourse();
if course then
self:settext(course:GetEstimatedNumStages() .. " songs");
self:queuecommand("Refresh");
else
self:settext("");
self:queuecommand("Refresh");
end
end;
};
};
t[#t+1] = Def.ActorFrame {
InitCommand=cmd(x,SCREEN_CENTER_X+5;draworder,126);
OnCommand=cmd(diffusealpha,0;smooth,0.3;diffusealpha,1;);
OffCommand=cmd(smooth,0.2;diffusealpha,0;);
LoadFont("Common Condensed") .. {
InitCommand=cmd(horizalign,right;zoom,1.0;y,SCREEN_CENTER_Y-78+2;maxwidth,180;diffuse,color("#DFE2E9");visible,GAMESTATE:IsCourseMode(););
CurrentCourseChangedMessageCommand=cmd(queuecommand,"Set");
ChangedLanguageDisplayMessageCommand=cmd(queuecommand,"Set");
SetCommand=function(self)
local course = GAMESTATE:GetCurrentCourse();
if course then
self:settext(CourseTypeToLocalizedString(course:GetCourseType()));
self:queuecommand("Refresh");
else
self:settext("");
self:queuecommand("Refresh");
end
end;
};
};
t[#t+1] = StandardDecorationFromFileOptional("CourseContentsList","CourseContentsList");
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);
-- P1 Difficulty Pane
t[#t+1] = Def.ActorFrame {
InitCommand=cmd(visible,GAMESTATE:IsHumanPlayer(PLAYER_1);horizalign,center;x,SCREEN_CENTER_X-210-32;y,SCREEN_CENTER_Y+230+8;);
OnCommand=cmd(zoomy,0.8;diffusealpha,0;smooth,0.4;diffusealpha,1;zoomy,1);
PlayerJoinedMessageCommand=function(self,param)
if param.Player == PLAYER_1 then
(cmd(visible,true;diffusealpha,0;linear,0.3;diffusealpha,1))(self);
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");
OffCommand=cmd(decelerate,0.3;zoomy,0.8;diffusealpha,0);
LoadActor(THEME:GetPathG("ScreenSelectMusic", "pane background")) .. {
CurrentStepsP1ChangedMessageCommand=cmd(queuecommand,"Set";);
PlayerJoinedMessageCommand=cmd(queuecommand,"Set";diffusealpha,0;decelerate,0.3;diffusealpha,1;);
ChangedLanguageDisplayMessageCommand=cmd(queuecommand,"Set");
SetCommand=function(self)
stepsP1 = GAMESTATE:GetCurrentSteps(PLAYER_1)
local song = GAMESTATE:GetCurrentSong();
if song then
if stepsP1 ~= nil then
local st = stepsP1:GetStepsType();
local diff = stepsP1:GetDifficulty();
local courseType = GAMESTATE:IsCourseMode() and SongOrCourse:GetCourseType() or nil;
local cd = GetCustomDifficulty(st, diff, courseType);
self:finishtweening():linear(0.2):diffuse(ColorLightTone(CustomDifficultyToColor(cd)));
else
self:diffuse(color("#666666"));
end
else
self:diffuse(color("#666666"));
end
end
};
LoadFont("StepsDisplay meter") .. {
InitCommand=cmd(zoom,1.25;diffuse,color("#000000");addx,-143;addy,13);
OnCommand=cmd(diffusealpha,0;smooth,0.2;diffusealpha,0.75;);
OffCommand=cmd(linear,0.3;diffusealpha,0;);
CurrentStepsP1ChangedMessageCommand=cmd(queuecommand,"Set";);
PlayerJoinedMessageCommand=cmd(queuecommand,"Set";diffusealpha,0;linear,0.3;diffusealpha,0.75;);
ChangedLanguageDisplayMessageCommand=cmd(queuecommand,"Set");
SetCommand=function(self)
stepsP1 = GAMESTATE:GetCurrentSteps(PLAYER_1)
local song = GAMESTATE:GetCurrentSong();
if song then
if stepsP1 ~= nil then
local st = stepsP1:GetStepsType();
local diff = stepsP1:GetDifficulty();
local courseType = GAMESTATE:IsCourseMode() and SongOrCourse:GetCourseType() or nil;
local cd = GetCustomDifficulty(st, diff, courseType);
self:settext(stepsP1:GetMeter())
else
self:settext("")
end
else
self:playcommand("Hide");
self:settext("")
end
else
self:playcommand("Hide");
end
end;
end
};
LoadFont("Common Italic Condensed") .. {
InitCommand=cmd(uppercase,true;zoom,1;addy,-40;addx,-143;diffuse,color("#000000");maxwidth,115;);
OnCommand=cmd(diffusealpha,0;smooth,0.2;diffusealpha,0.75;);
OffCommand=cmd(linear,0.3;diffusealpha,0;);
CurrentStepsP1ChangedMessageCommand=cmd(queuecommand,"Set";);
PlayerJoinedMessageCommand=cmd(queuecommand,"Set";diffusealpha,0;linear,0.3;diffusealpha,0.75;);
ChangedLanguageDisplayMessageCommand=cmd(queuecommand,"Set");
SetCommand=function(self)
stepsP1 = GAMESTATE:GetCurrentSteps(PLAYER_1)
local song = GAMESTATE:GetCurrentSong();
if song then
if stepsP1 ~= nil then
local st = stepsP1:GetStepsType();
local diff = stepsP1:GetDifficulty();
local courseType = GAMESTATE:IsCourseMode() and SongOrCourse:GetCourseType() or nil;
local cd = GetCustomDifficulty(st, diff, courseType);
self:settext(THEME:GetString("CustomDifficulty",ToEnumShortString(diff)));
else
self:settext("")
end
else
self:settext("")
end
end
};
LoadFont("Common Normal") .. {
InitCommand=cmd(uppercase,true;zoom,0.75;addy,-20;addx,-143;diffuse,color("#000000"););
OnCommand=cmd(diffusealpha,0;smooth,0.2;diffusealpha,0.75;);
OffCommand=cmd(linear,0.3;diffusealpha,0;);
CurrentStepsP1ChangedMessageCommand=cmd(queuecommand,"Set";);
PlayerJoinedMessageCommand=cmd(queuecommand,"Set";diffusealpha,0;linear,0.3;diffusealpha,0.75;);
ChangedLanguageDisplayMessageCommand=cmd(queuecommand,"Set");
SetCommand=function(self)
stepsP1 = GAMESTATE:GetCurrentSteps(PLAYER_1)
local song = GAMESTATE:GetCurrentSong();
if song then
if stepsP1 ~= nil then
local st = stepsP1:GetStepsType();
local diff = stepsP1:GetDifficulty();
local courseType = GAMESTATE:IsCourseMode() and SongOrCourse:GetCourseType() or nil;
local cd = GetCustomDifficulty(st, diff, courseType);
self:settext(THEME:GetString("StepsType",ToEnumShortString(st)));
else
self:settext("")
end
else
self:settext("")
end
end
};
};
t[#t+1] = StandardDecorationFromFileOptional("StageDisplay","StageDisplay");
-- P2 Difficulty Pane
t[#t+1] = Def.ActorFrame {
InitCommand=cmd(visible,GAMESTATE:IsHumanPlayer(PLAYER_2);horizalign,center;x,SCREEN_CENTER_X+210+32;y,SCREEN_CENTER_Y+230+8;);
OnCommand=cmd(zoomy,0.8;diffusealpha,0;smooth,0.4;diffusealpha,1;zoomy,1);
PlayerJoinedMessageCommand=function(self,param)
if param.Player == PLAYER_2 then
(cmd(visible,true;diffusealpha,0;linear,0.3;diffusealpha,1))(self);
end;
end;
OffCommand=cmd(decelerate,0.3;zoomy,0.8;diffusealpha,0);
LoadActor(THEME:GetPathG("ScreenSelectMusic", "pane background")) .. {
InitCommand=cmd(zoomx,-1;);
CurrentStepsP2ChangedMessageCommand=cmd(queuecommand,"Set";);
PlayerJoinedMessageCommand=cmd(queuecommand,"Set";diffusealpha,0;decelerate,0.3;diffusealpha,1;);
ChangedLanguageDisplayMessageCommand=cmd(queuecommand,"Set");
SetCommand=function(self)
stepsP2 = GAMESTATE:GetCurrentSteps(PLAYER_2)
local song = GAMESTATE:GetCurrentSong();
if song then
if stepsP2 ~= nil then
local st = stepsP2:GetStepsType();
local diff = stepsP2:GetDifficulty();
local courseType = GAMESTATE:IsCourseMode() and SongOrCourse:GetCourseType() or nil;
local cd = GetCustomDifficulty(st, diff, courseType);
self:finishtweening():linear(0.2):diffuse(ColorLightTone(CustomDifficultyToColor(cd)));
else
self:diffuse(color("#666666"));
end
else
self:diffuse(color("#666666"));
end
end
};
LoadFont("StepsDisplay meter") .. {
InitCommand=cmd(zoom,1.25;diffuse,color("#000000");addx,143;addy,13);
OnCommand=cmd(diffusealpha,0;smooth,0.2;diffusealpha,0.75;);
OffCommand=cmd(linear,0.3;diffusealpha,0;);
CurrentStepsP2ChangedMessageCommand=cmd(queuecommand,"Set";);
PlayerJoinedMessageCommand=cmd(queuecommand,"Set";diffusealpha,0;linear,0.3;diffusealpha,0.75;);
ChangedLanguageDisplayMessageCommand=cmd(queuecommand,"Set");
SetCommand=function(self)
stepsP2 = GAMESTATE:GetCurrentSteps(PLAYER_2)
local song = GAMESTATE:GetCurrentSong();
if song then
if stepsP2 ~= nil then
local st = stepsP2:GetStepsType();
local diff = stepsP2:GetDifficulty();
local courseType = GAMESTATE:IsCourseMode() and SongOrCourse:GetCourseType() or nil;
local cd = GetCustomDifficulty(st, diff, courseType);
self:settext(stepsP2:GetMeter())
else
self:settext("")
end
else
self:settext("")
end
end
};
LoadFont("Common Italic Condensed") .. {
InitCommand=cmd(uppercase,true;zoom,1;addy,-40;addx,143;diffuse,color("#000000");maxwidth,115;);
OnCommand=cmd(diffusealpha,0;smooth,0.2;diffusealpha,0.75;);
OffCommand=cmd(linear,0.3;diffusealpha,0;);
CurrentStepsP2ChangedMessageCommand=cmd(queuecommand,"Set";);
PlayerJoinedMessageCommand=cmd(queuecommand,"Set";diffusealpha,0;linear,0.3;diffusealpha,0.75;);
ChangedLanguageDisplayMessageCommand=cmd(queuecommand,"Set");
SetCommand=function(self)
stepsP2 = GAMESTATE:GetCurrentSteps(PLAYER_2)
local song = GAMESTATE:GetCurrentSong();
if song then
if stepsP2 ~= nil then
local st = stepsP2:GetStepsType();
local diff = stepsP2:GetDifficulty();
local courseType = GAMESTATE:IsCourseMode() and SongOrCourse:GetCourseType() or nil;
local cd = GetCustomDifficulty(st, diff, courseType);
self:settext(THEME:GetString("CustomDifficulty",ToEnumShortString(diff)));
else
self:settext("")
end
else
self:settext("")
end
end
};
LoadFont("Common Normal") .. {
InitCommand=cmd(uppercase,true;zoom,0.75;addy,-20;addx,143;diffuse,color("#000000"););
OnCommand=cmd(diffusealpha,0;smooth,0.2;diffusealpha,0.75;);
OffCommand=cmd(linear,0.3;diffusealpha,0;);
CurrentStepsP2ChangedMessageCommand=cmd(queuecommand,"Set";);
PlayerJoinedMessageCommand=cmd(queuecommand,"Set";diffusealpha,0;linear,0.3;diffusealpha,0.75;);
ChangedLanguageDisplayMessageCommand=cmd(queuecommand,"Set");
SetCommand=function(self)
stepsP2 = GAMESTATE:GetCurrentSteps(PLAYER_2)
local song = GAMESTATE:GetCurrentSong();
if song then
if stepsP2 ~= nil then
local st = stepsP2:GetStepsType();
local diff = stepsP2:GetDifficulty();
local courseType = GAMESTATE:IsCourseMode() and SongOrCourse:GetCourseType() or nil;
local cd = GetCustomDifficulty(st, diff, courseType);
self:settext(THEME:GetString("StepsType",ToEnumShortString(st)));
else
self:settext("")
end
else
self:settext("")
end
end
};
};
t[#t+1] = StandardDecorationFromFileOptional("PaneDisplayTextP1","PaneDisplayTextP1");
t[#t+1] = StandardDecorationFromFileOptional("PaneDisplayTextP2","PaneDisplayTextP2");
t[#t+1] = StandardDecorationFromTable("PercentScore"..ToEnumShortString(PLAYER_1), PercentScore(PLAYER_1));
t[#t+1] = StandardDecorationFromTable("PercentScore"..ToEnumShortString(PLAYER_2), PercentScore(PLAYER_2));
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;
-- BPMDisplay
t[#t+1] = Def.ActorFrame {
InitCommand=cmd(draworder,126;visible,not GAMESTATE:IsCourseMode(););
OnCommand=cmd(diffusealpha,0;smooth,0.3;diffusealpha,1;);
OffCommand=cmd(linear,0.3;diffusealpha,0;);
LoadFont("Common Condensed") .. {
InitCommand=cmd(horizalign,right;x,SCREEN_CENTER_X-198+69-66;y,SCREEN_CENTER_Y-78+2;diffuse,color("#512232");horizalign,right;visible,not GAMESTATE:IsCourseMode(););
OnCommand=cmd(queuecommand,"Set");
ChangedLanguageDisplayMessageCommand=cmd(queuecommand,"Set");
SetCommand=function(self)
self:settext("BPM"):diffuse(ColorLightTone(StageToColor(curStage)));
end;
};
StandardDecorationFromFileOptional("BPMDisplay","BPMDisplay");
};
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("DifficultyList","DifficultyList");
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);
t[#t+1] = Def.ActorFrame{
Def.Quad{
InitCommand=cmd(draworder,160;FullScreen;diffuse,color("0,0,0,1");diffusealpha,0);
ShowPressStartForOptionsCommand=cmd(sleep,0.2;decelerate,0.5;diffusealpha,1);
};
};
return t
t[#t+1] = StandardDecorationFromFileOptional("AlternateHelpDisplay","AlternateHelpDisplay");
t[#t+1] = Def.ActorFrame {
OffCommand=cmd(sleep,0.1;linear,0.2;diffusealpha,0;);
InitCommand=cmd(x,SCREEN_CENTER_X-84;visible,not GAMESTATE:IsCourseMode(););
StandardDecorationFromFileOptional("StageDisplay","StageDisplay") .. {
InitCommand=cmd(zoom,1);
};
};
return t;
@@ -0,0 +1,6 @@
local transition_params = {
color = color("#005A9D"),
transition_type = "in"
}
return LoadActor(THEME:GetPathB("", "_transition"), transition_params)
@@ -1,70 +1,45 @@
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 {};
-- Sort order
t[#t+1] = Def.ActorFrame {
InitCommand=cmd(x,SCREEN_RIGHT-290;y,SCREEN_TOP+49;;);
OffCommand=cmd(linear,0.3;diffusealpha,0;);
LoadActor(THEME:GetPathG("", "_sortFrame")) .. {
InitCommand=cmd(diffusealpha,0.9;zoom,1.5);
OnCommand=function(self)
self:diffuse(ScreenColor(SCREENMAN:GetTopScreen():GetName()));
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;
LoadFont("Common Condensed") .. {
InitCommand=cmd(zoom,1;diffuse,color("#FFFFFF");diffusealpha,0.85;horizalign,left;addx,-115;);
OnCommand=cmd(queuecommand,"Set");
ChangedLanguageDisplayMessageCommand=cmd(queuecommand,"Set");
SetCommand=function(self)
self:settext("SORT:");
self:queuecommand("Refresh");
end;
};
LoadFont("Common Condensed") .. {
InitCommand=cmd(zoom,1;maxwidth,SCREEN_WIDTH;addx,115;diffuse,color("#FFFFFF");uppercase,true;horizalign,right;);
OnCommand=cmd(queuecommand,"Set");
SortOrderChangedMessageCommand=cmd(queuecommand,"Set");
ChangedLanguageDisplayMessageCommand=cmd(queuecommand,"Set");
SetCommand=function(self)
local sortorder = GAMESTATE:GetSortOrder();
if sortorder then
self:finishtweening();
self:smooth(0.4);
self:diffusealpha(0);
self:settext(SortOrderToLocalizedString(sortorder));
self:queuecommand("Refresh"):stoptweening():diffusealpha(0):smooth(0.3):diffusealpha(1)
else
self:settext("");
self:queuecommand("Refresh");
end
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;
return t
@@ -1,9 +1,13 @@
function GetLocalProfiles()
local ret = {};
local t = {};
function GetSongsPlayedString(numSongs)
return numSongs == 1 and Screen.String("SingularSongPlayed") or Screen.String("SeveralSongsPlayed")
end
for p = 0,PROFILEMAN:GetNumLocalProfiles()-1 do
local profile=PROFILEMAN:GetLocalProfileFromIndex(p);
local item = Def.ActorFrame {
local ProfileCard = Def.ActorFrame {
--[[ Def.Quad {
InitCommand=cmd(zoomto,200,1;y,40/2);
OnCommand=cmd(diffuse,Color('Outline'););
@@ -16,35 +20,33 @@ function GetLocalProfiles()
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) );
self:settext( string.format( GetSongsPlayedString( numSongsPlayed ), numSongsPlayed ) )
end;
};
};
table.insert( ret, item );
t[#t+1]=ProfileCard;
end;
return ret;
return t;
end;
function LoadCard(cColor)
local t = Def.ActorFrame {
LoadActor( THEME:GetPathG("ScreenSelectProfile","CardBackground") ) .. {
InitCommand=cmd(diffuse,cColor);
};
LoadActor( THEME:GetPathG("ScreenSelectProfile","CardFrame") );
};
Def.Quad {
InitCommand=cmd(zoomto,300,SCREEN_HEIGHT/1.3;diffuse,ColorDarkTone(cColor);diffusealpha,0.6;fadetop,0.3;fadebottom,0.3)
}
}
return t
end
function LoadPlayerStuff(Player)
local ret = {};
local t = {};
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 {
t[#t+1] = Def.ActorFrame {
Name = 'JoinFrame';
LoadCard(Color('Orange'));
--[[ Def.Quad {
@@ -56,53 +58,31 @@ function LoadPlayerStuff(Player)
OnCommand=cmd(diffuse,Color('Orange');diffusealpha,0.5);
}; --]]
LoadFont("Common Normal") .. {
Text=THEME:GetString("ScreenSelectProfile","PressStart");
Text="Press &START; to join.";
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 {
t[#t+1] = Def.ActorFrame {
Name = 'BigFrame';
LoadCard(PlayerColor(Player));
};
table.insert( ret, t );
--[[ t = LoadActor(THEME:GetPathB('', '_frame 3x3'), 'metal', 170, 20) .. {
t[#t+1] = Def.ActorFrame {
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);
InitCommand=cmd(zoomto,300,40);
OnCommand=cmd(diffuse,PlayerColor(Player);fadeleft,0.25;faderight,0.25);
};
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';
t[#t+1] = Def.ActorScroller{
Name = 'Scroller';
NumItemsToDraw=6;
-- InitCommand=cmd(y,-230/2+20;);
--InitCommand=cmd(zoom,2);
OnCommand=cmd(y,1;SetFastCatchup,true;SetMask,200,58;SetSecondsPerItem,0.15);
OffCommand=cmd(decelerate,0.5;diffusealpha,0);
TransformFunction=function(self, offset, itemIndex, numItems)
local focus = scale(math.abs(offset),0,2,1,0);
self:visible(false);
@@ -113,40 +93,23 @@ function LoadPlayerStuff(Player)
end;
children = GetLocalProfiles();
};
table.insert( ret, t );
t = Def.ActorFrame {
t[#t+1] = 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") .. {
t[#t+1] = 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;
return t;
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 scroller = frame:GetChild('Scroller');
local seltext = frame:GetChild('SelectedProfileText');
local joinframe = frame:GetChild('JoinFrame');
local smallframe = frame:GetChild('SmallFrame');
@@ -193,59 +156,17 @@ function UpdateInternal3(self, Player)
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
-- here's a (messy) fix for one player's selection ending the screen,
-- at least until this whole thing is rewritten to be... Not this
local ready = {}
local function AllPlayersReady()
for i, pn in ipairs(GAMESTATE:GetHumanPlayers()) do
if not ready[pn] then
return false
end
}
input_functions.MenuLeft= input_functions.MenuUp
input_functions.MenuRight= input_functions.MenuDown
if input_functions[code] then
input_functions[code]()
end
-- if it hasn't returned false by now, surely it must be true, right? RIGHT???
return true
end
local t = Def.ActorFrame {
@@ -254,6 +175,57 @@ local t = Def.ActorFrame {
self:queuecommand('UpdateInternal2');
end;
CodeMessageCommand = function(self, params)
if params.Name == 'Start' or params.Name == 'Center' then
MESSAGEMAN:Broadcast("StartButton");
if not GAMESTATE:IsHumanPlayer(params.PlayerNumber) then
SCREENMAN:GetTopScreen():SetProfileIndex(params.PlayerNumber, -1);
else
ready[params.PlayerNumber] = true
if AllPlayersReady() then
SCREENMAN:GetTopScreen():Finish();
end
end;
end;
if params.Name == 'Up' or params.Name == 'Up2' or params.Name == 'DownLeft' then
-- Added a line to make sure the player can't fiddle around in the menu
-- after they've already made a selection.
if GAMESTATE:IsHumanPlayer(params.PlayerNumber) and not ready[params.PlayerNumber] then
local ind = SCREENMAN:GetTopScreen():GetProfileIndex(params.PlayerNumber);
if ind > 1 then
if SCREENMAN:GetTopScreen():SetProfileIndex(params.PlayerNumber, ind - 1 ) then
MESSAGEMAN:Broadcast("DirectionButton");
self:queuecommand('UpdateInternal2');
end;
end;
end;
end;
if params.Name == 'Down' or params.Name == 'Down2' or params.Name == 'DownRight' then
if GAMESTATE:IsHumanPlayer(params.PlayerNumber) and not ready[params.PlayerNumber] then
local ind = SCREENMAN:GetTopScreen():GetProfileIndex(params.PlayerNumber);
if ind > 0 then
if SCREENMAN:GetTopScreen():SetProfileIndex(params.PlayerNumber, ind + 1 ) then
MESSAGEMAN:Broadcast("DirectionButton");
self:queuecommand('UpdateInternal2');
end;
end;
end;
end;
if params.Name == 'Back' then
if GAMESTATE:GetNumPlayersEnabled()==0 then
SCREENMAN:GetTopScreen():Cancel();
else
MESSAGEMAN:Broadcast("BackButton")
-- Allow... erm... un-readying a player.
if ready[params.PlayerNumber] then
ready[params.PlayerNumber] = false
else
SCREENMAN:GetTopScreen():SetProfileIndex(params.PlayerNumber, -2);
end
end;
end;
end;
PlayerJoinedMessageCommand=function(self, params)
self:queuecommand('UpdateInternal2');
end;
@@ -263,8 +235,6 @@ local t = Def.ActorFrame {
end;
OnCommand=function(self, params)
main_frame= self:GetParent()
SCREENMAN:GetTopScreen():AddInputCallback(input)
self:queuecommand('UpdateInternal2');
end;
@@ -277,38 +247,35 @@ local t = Def.ActorFrame {
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;
--OnCommand=cmd(zoom,0;bounceend,0.35;zoom,1);
OffCommand=cmd(decelerate,0.3;diffusealpha,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;
--OnCommand=cmd(zoom,0;bounceend,0.35;zoom,1);
OffCommand=cmd(decelerate,0.3;diffusealpha,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);
};
};
@@ -1,4 +1,7 @@
if not GAMESTATE:IsCourseMode() then return Def.ActorFrame{} end; -- short circuit
local slideTime = 1.1;
local slideWait = 1.25;
local bottomSlide = 0.76;
local course = GAMESTATE:GetCurrentCourse()
local t = Def.ActorFrame{
@@ -13,17 +16,19 @@ local t = Def.ActorFrame{
self:LoadFromCurrentSongBackground()
end
end;
OnCommand=cmd(diffusealpha,0;scale_or_crop_background;sleep,0.5;linear,0.50;diffusealpha,1;sleep,3);
};
OnCommand=function(self)
self:scale_or_crop_background()
self:addy(SCREEN_HEIGHT):sleep(slideWait):smooth(slideTime):addy(-SCREEN_HEIGHT);
end;
};
-- alternate background
Def.Sprite{
InitCommand=cmd(Center;);
BeginCommand=cmd(LoadFromCurrentSongBackground;scale_or_crop_background;diffusealpha,0);
OnCommand=cmd(sleep,4;playcommand,"Show");
OnCommand=cmd(playcommand,"Show");
ShowCommand=function(self)
if course:HasBackground() then
self:accelerate(0.25)
self:diffusealpha(1)
self:addy(SCREEN_HEIGHT):sleep(slideWait):smooth(slideTime):addy(-SCREEN_HEIGHT);
end
end;
};
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

@@ -1,4 +1,8 @@
local playMode = GAMESTATE:GetPlayMode()
local slideTime = 1.1;
local slideWait = 1.25;
local bottomSlide = 0.76;
local easeTime = 0.10;
local sStage = ""
sStage = GAMESTATE:GetCurrentStage()
@@ -11,22 +15,41 @@ 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);
InitCommand=cmd(Center;diffusealpha,0.26);
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)
self:addy(SCREEN_HEIGHT):sleep(slideWait):smooth(slideTime):addy(-SCREEN_HEIGHT):diffusealpha(1);
end;
};
end
-- BG for credits
t[#t+1] = Def.ActorFrame {
OnCommand=cmd(addy,SCREEN_HEIGHT;sleep,slideWait;smooth,slideTime+easeTime;addy,-SCREEN_HEIGHT;sleep,2-easeTime;smooth,bottomSlide;addy,240);
-- Behind stage graphic
Def.Quad {
InitCommand=cmd(vertalign,bottom;x,SCREEN_CENTER_X;y,SCREEN_BOTTOM-110;zoomto,SCREEN_WIDTH,120;);
OnCommand=function(self)
self:diffuse(color("#000000")):diffusealpha(0.8);
end
};
-- Behind song
Def.Quad {
InitCommand=cmd(vertalign,bottom;x,SCREEN_CENTER_X;y,SCREEN_BOTTOM;zoomto,SCREEN_WIDTH,110;);
OnCommand=function(self)
self:diffuse(color("#000000")):diffusealpha(0.9);
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)
@@ -46,46 +69,127 @@ else
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);
InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y+190);
OnCommand=cmd(addy,SCREEN_HEIGHT;sleep,slideWait;smooth,slideTime+easeTime;addy,-SCREEN_HEIGHT;sleep,2-easeTime;smooth,bottomSlide;addy,240;);
stage_num_actor .. {
OnCommand=cmd(diffusealpha,0;linear,0.25;diffusealpha,1;sleep,1.75;linear,0.5;zoomy,0;zoomx,2;diffusealpha,0);
OnCommand=cmd(zoom,1;diffusealpha,1);
};
};
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) );
-- Step author credits
if GAMESTATE:IsHumanPlayer(PLAYER_1) == true then
t[#t+1] = Def.ActorFrame {
InitCommand=cmd(y,SCREEN_BOTTOM-80;x,SCREEN_LEFT+40;);
OnCommand=cmd(addy,SCREEN_HEIGHT;sleep,slideWait;smooth,slideTime+easeTime;addy,-SCREEN_HEIGHT;sleep,2-easeTime;smooth,bottomSlide;addy,240;);
LoadFont("Common Italic Condensed") .. {
OnCommand=cmd(playcommand,"Set";horizalign,left;diffuse,color("#FFFFFF"););
SetCommand=function(self)
stepsP1 = GAMESTATE:GetCurrentSteps(PLAYER_1)
local song = GAMESTATE:GetCurrentSong();
if song then
if stepsP1:GetAuthorCredit() ~= "" then
self:settext(string.upper(THEME:GetString("OptionTitles","Step Author")) .. ":");
else
text = SongOrCourse:GetEstimatedNumStages() .." Stages / ".. SecondsToMSSMsMs( TrailUtil.GetTotalSeconds(trail) );
self:settext("")
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);
self:settext("")
end
end
};
LoadFont("Common Fallback Font") .. {
InitCommand=cmd(addy,22);
OnCommand=cmd(playcommand,"Set";horizalign,left;zoom,0.75;diffuse,color("#FFFFFF"););
SetCommand=function(self)
stepsP1 = GAMESTATE:GetCurrentSteps(PLAYER_1)
local song = GAMESTATE:GetCurrentSong();
if song then
if stepsP1 ~= nil then
self:settext(stepsP1:GetAuthorCredit())
else
self:settext("")
end
else
self:settext("")
end
end
};
};
end
if GAMESTATE:IsHumanPlayer(PLAYER_2) == true then
t[#t+1] = Def.ActorFrame {
InitCommand=cmd(y,SCREEN_BOTTOM-80;x,SCREEN_RIGHT-40;);
OnCommand=cmd(addy,SCREEN_HEIGHT;sleep,slideWait;smooth,slideTime+easeTime;addy,-SCREEN_HEIGHT;sleep,2-easeTime;smooth,bottomSlide;addy,240;);
LoadFont("Common Italic Condensed") .. {
OnCommand=cmd(playcommand,"Set";horizalign,right;diffuse,color("#FFFFFF"););
SetCommand=function(self)
stepsP2 = GAMESTATE:GetCurrentSteps(PLAYER_2)
local song = GAMESTATE:GetCurrentSong();
if song then
local diff = stepsP2:GetDifficulty();
if stepsP2:GetAuthorCredit() ~= "" then
self:settext(string.upper(THEME:GetString("OptionTitles","Step Author")) .. ":");
else
self:settext("")
end
else
self:settext("")
end
end
};
LoadFont("Common Fallback Font") .. {
InitCommand=cmd(addy,22);
OnCommand=cmd(playcommand,"Set";horizalign,right;zoom,0.75;diffuse,color("#FFFFFF"););
SetCommand=function(self)
stepsP2 = GAMESTATE:GetCurrentSteps(PLAYER_2)
local song = GAMESTATE:GetCurrentSong();
if song then
if stepsP2 ~= nil then
self:settext(stepsP2:GetAuthorCredit())
else
self:settext("")
end
else
self:settext("")
end
end
};
};
end
-- Song title and artist
t[#t+1] = Def.ActorFrame {
InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_BOTTOM-80);
OnCommand=cmd(addy,SCREEN_HEIGHT;sleep,slideWait;smooth,slideTime+easeTime;addy,-SCREEN_HEIGHT;sleep,2-easeTime;smooth,bottomSlide;addy,240;);
LoadFont("Common Fallback Font") .. {
Text=GAMESTATE:IsCourseMode() and GAMESTATE:GetCurrentCourse():GetDisplayFullTitle() or GAMESTATE:GetCurrentSong():GetDisplayFullTitle();
InitCommand=cmd(diffuse,color("#FFFFFF");maxwidth,SCREEN_WIDTH*0.6);
OnCommand=cmd(zoom,1;);
};
LoadFont("Common Fallback Font") .. {
Text=GAMESTATE:IsCourseMode() and ToEnumShortString( GAMESTATE:GetCurrentCourse():GetCourseType() ) or GAMESTATE:GetCurrentSong():GetDisplayArtist();
InitCommand=cmd(diffuse,color("#FFFFFF");maxwidth,SCREEN_WIDTH*0.6);
OnCommand=cmd(zoom,0.75;addy,24;);
};
};
-- Stunt BG in case the BG accidentally overhangs
t[#t+1] = Def.Quad {
InitCommand=cmd(Center;zoomto,SCREEN_WIDTH,SCREEN_HEIGHT;diffuse,Color("Black"));
OnCommand=cmd(sleep,slideWait;smooth,slideTime;addy,-SCREEN_HEIGHT;sleep,0.2;diffusealpha,0);
};
t[#t+1] = Def.ActorFrame {
LoadActor("_arrow") .. {
InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;diffuse,color("#DAD6CC"););
OnCommand=cmd(diffusealpha,0;sleep,0.5;diffusealpha,0.6;decelerate,0.4;zoom,1.2;diffusealpha,0;);
};
LoadActor("_arrow") .. {
InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;diffuse,color("#DAD6CC"););
OnCommand=cmd(zoom,0;bounceend,0.5;zoom,1;sleep,0.75;smooth,slideTime;addy,-SCREEN_HEIGHT;);
};
};
@@ -0,0 +1,92 @@
local function CreditsText( pn )
local text = LoadFont(Var "LoadingScreen","credits") .. {
InitCommand=function(self)
self:name("Credits" .. PlayerNumberToString(pn))
ActorUtil.LoadAllCommandsAndSetXY(self,Var "LoadingScreen");
end;
UpdateTextCommand=function(self)
local str = ScreenSystemLayerHelpers.GetCreditsMessage(pn);
self:settext(str);
end;
UpdateVisibleCommand=function(self)
local screen = SCREENMAN:GetTopScreen();
local bShow = true;
if screen then
local sClass = screen:GetName();
bShow = THEME:GetMetric( sClass, "ShowCreditDisplay" );
end
self:visible( bShow );
end
};
return text;
end;
--[[ local function PlayerPane( PlayerNumber )
local t = Def.ActorFrame {
InitCommand=function(self)
self:name("PlayerPane" .. PlayerNumberToString(PlayerNumber));
-- ActorUtil.LoadAllCommandsAndSetXY(self,Var "LoadingScreen");
end
};
t[#t+1] = Def.ActorFrame {
Name = "Background";
Def.Quad {
InitCommand=cmd(zoomto,160,28;queuecommand,"On");
OnCommand=cmd(diffuse,PlayerColor(PlayerNumber);fadebottom,1);
};
};
t[#t+1] = Def.BitmapText{
Font="Common Normal";
Name = "PlayerText";
InitCommand=cmd(x,-60;maxwidth,80/0.5;zoom,0.5;queuecommand,"On");
OnCommand=cmd(playcommand,"Set");
SetCommand=function(self)
local profile = PROFILEMAN:GetProfile( PlayerNumber) or PROFILEMAN:GetMachineProfile()
if profile then
self:settext( profile:GetDisplayName() );
else
self:settext( "NoProf" );
end
end;
};
return t
end --]]
--
local t = Def.ActorFrame {}
-- Aux
t[#t+1] = LoadActor(THEME:GetPathB("ScreenSystemLayer","aux"));
-- Credits
t[#t+1] = Def.ActorFrame {
--[[ PlayerPane( PLAYER_1 ) .. {
InitCommand=cmd(x,scale(0.125,0,1,SCREEN_LEFT,SCREEN_WIDTH);y,SCREEN_BOTTOM-16)
}; --]]
CreditsText( PLAYER_1 );
CreditsText( PLAYER_2 );
};
-- Text
t[#t+1] = Def.ActorFrame {
Def.Quad {
InitCommand=cmd(zoomtowidth,SCREEN_WIDTH;zoomtoheight,30;horizalign,left;vertalign,top;y,SCREEN_TOP;diffuse,color("0,0,0,0"));
OnCommand=cmd(finishtweening;diffusealpha,0.85;);
OffCommand=cmd(sleep,3;linear,0.5;diffusealpha,0;);
};
Def.BitmapText{
Font="_fira mono 24px";
Name="Text";
InitCommand=cmd(maxwidth,750;horizalign,left;vertalign,top;y,SCREEN_TOP+10;x,SCREEN_LEFT+10;shadowlength,1;diffusealpha,0;);
OnCommand=cmd(finishtweening;diffusealpha,1;zoom,0.5);
OffCommand=cmd(sleep,3;linear,0.5;diffusealpha,0;);
};
SystemMessageMessageCommand = function(self, params)
self:GetChild("Text"):settext( params.Message );
self:playcommand( "On" );
if params.NoAnimate then
self:finishtweening();
end
self:playcommand( "Off" );
end;
HideSystemMessageMessageCommand = cmd(finishtweening);
};
return t;
@@ -0,0 +1,7 @@
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"));
OnCommand=cmd(diffusealpha,0;smooth,0.2;diffusealpha,0.5;);
OffCommand=cmd(smooth,0.2;diffusealpha,0;);
};
};
Binary file not shown.

After

Width:  |  Height:  |  Size: 174 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

@@ -0,0 +1,72 @@
local t = Def.ActorFrame{};
local Params = {
NumParticles = 20,
VelocityXMin = 70,
VelocityXMax = 90,
VelocityYMin = 70,
VelocityYMax = 90,
VelocityZMin = 0,
VelocityZMax = 0,
BobRateZMin = 0.4,
BobRateZMax = 0.7,
ZoomMin = 0.2,
ZoomMax = 0.6,
SpinZ = 0,
BobZ = 52,
File = "_particle normal",
};
local tParticleInfo = {}
for i=1,Params.NumParticles do
tParticleInfo[i] = {
X = math.random(Params.VelocityXMin, Params.VelocityXMax),
Y = Params.VelocityYMin ~= Params.VelocityYMax and math.random(Params.VelocityYMin, Params.VelocityYMax) or Params.VelocityYMin,
Z = Params.VelocityZMin ~= Params.VelocityZMax and math.random(Params.VelocityZMin, Params.VelocityZMax) or Params.VelocityZMin,
Zoom = math.random(Params.ZoomMin*1000,Params.ZoomMax*1000) / 1000,
BobZRate = math.random(Params.BobRateZMin*1000,Params.BobRateZMax*1000) / 1000,
Age = 0,
};
t[#t+1] = LoadActor( Params.File )..{
Name="Particle"..i;
InitCommand=function(self)
self:basezoom(tParticleInfo[i].Zoom);
self:x(math.random(SCREEN_LEFT+(self:GetWidth()/2),SCREEN_RIGHT-(self:GetWidth()/2)));
self:y(math.random(SCREEN_TOP+(self:GetHeight()/2),SCREEN_BOTTOM-(self:GetHeight()/2)));
--self:z(math.random(-64,0));
end;
OnCommand=cmd(diffusealpha,1);
};
end
local function UpdateParticles(self,DeltaTime)
tParticles = self:GetChildren();
for i=1, Params.NumParticles do
local p = tParticles["Particle"..i];
local vX = tParticleInfo[i].X;
local vY = tParticleInfo[i].Y;
local vZ = tParticleInfo[i].Z;
tParticleInfo[i].Age = tParticleInfo[i].Age + DeltaTime;
p:x(p:GetX() + (vX * DeltaTime));
p:y(p:GetY() + (vY * DeltaTime));
p:z(p:GetZ() + (vZ * DeltaTime));
-- p:zoom( 1 + math.cos(
-- (tParticleInfo[i].Age * math.pi*2)
-- ) * 0.125 );
if p:GetX() > SCREEN_RIGHT + (p:GetWidth()/2 - p:GetZ()) then
p:x(SCREEN_LEFT - (p:GetWidth()/2));
elseif p:GetX() < SCREEN_LEFT - (p:GetWidth()/2 - p:GetZ()) then
p:x(SCREEN_RIGHT + (p:GetWidth()/2));
end
if p:GetY() > SCREEN_BOTTOM + (p:GetHeight()/2 - p:GetZ()) then
p:y(SCREEN_TOP - (p:GetHeight()/2));
elseif p:GetY() < SCREEN_TOP - (p:GetHeight()/2 - p:GetZ()) then
p:y(SCREEN_BOTTOM + (p:GetHeight()/2));
end
end;
end;
t.InitCommand = cmd(fov,90;SetUpdateFunction,UpdateParticles);
return t;
Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

@@ -0,0 +1,32 @@
return Def.ActorFrame {
LoadActor(THEME:GetPathG("common bg", "base")) .. {
InitCommand=cmd(Center;zoomto,SCREEN_WIDTH,SCREEN_HEIGHT)
};
LoadActor("_particleLoader") .. {
};
LoadActor("_maze") .. {
OnCommand=cmd(Center;diffuse,color("#f6784922");effectperiod,10;spin;effectmagnitude,0,0,2.2)
};
Def.ActorFrame {
OnCommand=cmd(diffusealpha,0;decelerate,1.8;diffusealpha,1;);
LoadActor("_tunnel1") .. {
InitCommand=cmd(Center;blend,'BlendMode_Add';rotationz,-20),
OnCommand=cmd(zoom,1.75;diffusealpha,0.12;spin;effectmagnitude,0,0,16.5)
};
LoadActor("_tunnel1") .. {
InitCommand=cmd(Center;blend,'BlendMode_Add';rotationz,-10),
OnCommand=cmd(zoom,1.0;diffusealpha,0.09;spin;effectmagnitude,0,0,-11)
};
LoadActor("_tunnel1") .. {
InitCommand=cmd(Center;blend,'BlendMode_Add';rotationz,0),
OnCommand=cmd(zoom,0.5;diffusealpha,0.06;spin;effectmagnitude,0,0,5.5)
};
LoadActor("_tunnel1") .. {
InitCommand=cmd(Center;blend,'BlendMode_Add';rotationz,-10),
OnCommand=cmd(zoom,0.2;diffusealpha,0.03;spin;effectmagnitude,0,0,-2.2)
};
};
}
@@ -2,7 +2,17 @@ InitUserPrefs();
local t = Def.ActorFrame {}
t[#t+1] = StandardDecorationFromFileOptional("Footer","Footer");
t[#t+1] = Def.ActorFrame {
OnCommand=function(self)
if not FILEMAN:DoesFileExist("Save/ThemePrefs.ini") then
Trace("ThemePrefs doesn't exist; creating file")
ThemePrefs.ForceSave()
end
ThemePrefs.Save()
end;
};
t[#t+1] = StandardDecorationFromFileOptional("Logo","Logo");
t[#t+1] = StandardDecorationFromFileOptional("VersionInfo","VersionInfo");
t[#t+1] = StandardDecorationFromFileOptional("CurrentGametype","CurrentGametype");
Binary file not shown.

After

Width:  |  Height:  |  Size: 302 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

@@ -1,35 +1,46 @@
local t = Def.ActorFrame {};
t[#t+1] = Def.ActorFrame {
FOV=90;
InitCommand=cmd(Center);
Def.Quad {
InitCommand=cmd(scaletoclipped,SCREEN_WIDTH,SCREEN_HEIGHT);
OnCommand=cmd(diffuse,color("#FFCB05");diffusebottomedge,color("#F0BA00"));
};
Def.ActorFrame {
InitCommand=cmd(hide_if,hideFancyElements;);
LoadActor("_checkerboard") .. {
InitCommand=cmd(rotationy,0;rotationz,0;rotationx,-90/4*3.5;zoomto,SCREEN_WIDTH*2,SCREEN_HEIGHT*2;customtexturerect,0,0,SCREEN_WIDTH*4/256,SCREEN_HEIGHT*4/256);
OnCommand=cmd(texcoordvelocity,0,0.25;diffuse,color("#ffd400");fadetop,1);
-- You know what, I guess the "fancy UI background" theme option can be put to use.
if ThemePrefs.Get("FancyUIBG") then
return Def.ActorFrame {
LoadActor(THEME:GetPathG("common bg", "base")) .. {
InitCommand=cmd(Center;zoomto,SCREEN_WIDTH,SCREEN_HEIGHT)
},
LoadActor("_maze") .. {
OnCommand=cmd(Center;diffuse,color("#f6784922");effectperiod,10;spin;effectmagnitude,0,0,2.2)
},
LoadActor("_barcode") .. {
InitCommand=cmd(zoomto,36,1024;blend,'BlendMode_Add';x,SCREEN_LEFT+36;y,SCREEN_CENTER_Y;diffusealpha,0.08);
OnCommand=cmd(customtexturerect,0,0,1,1;texcoordvelocity,0,-0.1);
};
LoadActor("_barcode") .. {
InitCommand=cmd(zoomto,36,1024;blend,'BlendMode_Add';x,SCREEN_RIGHT-36;y,SCREEN_CENTER_Y;diffusealpha,0.08);
OnCommand=cmd(customtexturerect,0,0,1,1;texcoordvelocity,0,0.1);
};
Def.ActorFrame {
OnCommand=cmd(diffusealpha,0;decelerate,1.8;diffusealpha,1;);
LoadActor("_tunnel1") .. {
InitCommand=cmd(x,SCREEN_LEFT+160;y,SCREEN_CENTER_Y;blend,'BlendMode_Add';rotationz,-20),
OnCommand=cmd(zoom,1.75;diffusealpha,0.14;spin;effectmagnitude,0,0,16.5)
};
LoadActor("_tunnel1") .. {
InitCommand=cmd(x,SCREEN_LEFT+160;y,SCREEN_CENTER_Y;blend,'BlendMode_Add';rotationz,-10),
OnCommand=cmd(zoom,1.0;diffusealpha,0.12;spin;effectmagnitude,0,0,-11)
};
LoadActor("_tunnel1") .. {
InitCommand=cmd(x,SCREEN_LEFT+160;y,SCREEN_CENTER_Y;blend,'BlendMode_Add';rotationz,0),
OnCommand=cmd(zoom,0.5;diffusealpha,0.10;spin;effectmagnitude,0,0,5.5)
};
LoadActor("_tunnel1") .. {
InitCommand=cmd(x,SCREEN_LEFT+160;y,SCREEN_CENTER_Y;blend,'BlendMode_Add';rotationz,-10),
OnCommand=cmd(zoom,0.2;diffusealpha,0.08;spin;effectmagnitude,0,0,-2.2)
};
};
LoadActor("_particleLoader") .. {
InitCommand=cmd(x,-SCREEN_CENTER_X;y,-SCREEN_CENTER_Y;hide_if,hideFancyElements;);
};
--[[ LoadActor("_particles") .. {
InitCommand=cmd(x,-SCREEN_CENTER_X;y,-SCREEN_CENTER_Y);
}; --]]
--[[ LoadActor("_pattern") .. {
InitCommand=cmd(z,32;x,4;y,4;;rotationy,-12.25;rotationz,-30;rotationx,-20;zoomto,SCREEN_WIDTH*2,SCREEN_HEIGHT*2;customtexturerect,0,0,SCREEN_WIDTH*4/256,SCREEN_HEIGHT*4/256);
OnCommand=cmd(texcoordvelocity,0.125,0.5;diffuse,Color("Black");diffusealpha,0.5);
}; --]]
--[[ 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)*2,0,(7/8)*2,0;effectclock,'beatnooffset';
effectcolor2,Color("White");effectcolor1,Color("Black");fadebottom,0.25;fadetop,0.25;croptop,48/480;cropbottom,48/480;blend,Blend.Add;
diffusealpha,0.155);
}; --]]
};
return t;
}
else
return LoadActor(THEME:GetPathG("common bg", "base")) .. {
InitCommand=cmd(Center;zoomto,SCREEN_WIDTH,SCREEN_HEIGHT)
}
end
@@ -0,0 +1,11 @@
-- Alright, this is how we do things around here:
-- Write a table
local transition_params = {
color = color("#000000"),
transition_type = "in"
}
-- Give it to another worker and let them do all the work with it
return LoadActor(THEME:GetPathB("", "_transition"), transition_params)
-- Job done.
@@ -0,0 +1,6 @@
local transition_params = {
color = color("#000000"),
transition_type = "out"
}
return LoadActor(THEME:GetPathB("", "_transition"), transition_params)
@@ -8,11 +8,11 @@ t[#t+1] = Def.ActorFrame {
InitCommand=function(self)
ActorUtil.LoadAllCommandsAndSetXY(self,Var "LoadingScreen")
end;
LoadActor(THEME:GetPathG("OptionRowExit","Frame")) .. {
InitCommand=cmd(diffuse,Color("Orange");diffusealpha,0.35);
LoadActor(THEME:GetPathB("_frame","3x1"),"rounded fill", 250-32) .. {
OnCommand=cmd(diffuse,color("#8C1940");diffusealpha,1);
};
LoadFont("Common Normal") .. {
InitCommand=cmd(zoom,0.75;shadowlength,1;glowshift;strokecolor,Color("Outline");diffuse,Color("Orange");diffusetopedge,Color("Yellow");textglowmode,'TextGlowMode_Inner');
LoadFont("Common Italic Condensed") .. {
InitCommand=cmd(zoom,1;shadowlength,1;strokecolor,Color("Outline");diffuse,color("#FAB56B");diffusetopedge,color("#F2D5A2");uppercase,true);
Text="...";
OnCommand=cmd(playcommand,"Refresh");
CoinInsertedMessageCommand=cmd(playcommand,"Refresh");
Binary file not shown.

Before

Width:  |  Height:  |  Size: 333 B

After

Width:  |  Height:  |  Size: 301 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 420 B

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 333 B

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

@@ -0,0 +1,24 @@
-- To save on intense copy/pasting, this file was made to be loaded by actual in/out bganim files,
-- whose only real jobs are to pass in the transition type (in or out), and in certain cases, the
-- color (as is the case in ScreenEditMenu in, ScreenSelectMusic in, etc).
-- Other than that, there isn't really too much to say.
local t = Def.ActorFrame {}
local params = ...
local startAlpha = params.transition_type == "in" and 1 or 0
local endAlpha = math.abs(startAlpha-1)
for i=1, 6 do
local sleep_time = 0.1 * i
t[#t+1] = LoadActor(THEME:GetPathG("", "_pt" .. i)) .. {
InitCommand=cmd(zoomto,SCREEN_WIDTH,SCREEN_HEIGHT;Center;diffuse,params.color),
OnCommand=cmd(diffusealpha,startAlpha;sleep,sleep_time;linear,0.14;diffusealpha,endAlpha)
}
end
t[#t+1] = Def.Quad {
InitCommand=cmd(zoomto,SCREEN_WIDTH,SCREEN_HEIGHT;Center;diffuse,params.color),
OnCommand=cmd(diffusealpha,startAlpha;linear,0.7;diffusealpha,endAlpha)
}
return t

Some files were not shown because too many files have changed in this diff Show More