complete commit
This commit is contained in:
@@ -1,8 +1,3 @@
|
||||
-- ...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 = Def.ActorFrame {};
|
||||
|
||||
-- A very useful table...
|
||||
@@ -17,6 +12,12 @@ local eval_lines = {
|
||||
"MaxCombo"
|
||||
}
|
||||
|
||||
local eval_radar = {
|
||||
Types = { 'Mines', 'Hands', 'Rolls', 'Lifts' },
|
||||
}
|
||||
|
||||
local grade_area_offset = 16
|
||||
|
||||
-- And a function to make even better use out of the table.
|
||||
local function GetJLineValue(line, pl)
|
||||
if line == "Held" then
|
||||
@@ -98,7 +99,7 @@ for i, v in ipairs(eval_lines) do
|
||||
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)
|
||||
self:sleep(0.13 * i):decelerate(0.6):diffusealpha(0)
|
||||
end;
|
||||
Def.Quad {
|
||||
InitCommand=cmd(zoomto,400,36;diffuse,JudgmentLineToColor(cur_line);fadeleft,0.5;faderight,0.5;);
|
||||
@@ -111,7 +112,7 @@ for i, v in ipairs(eval_lines) do
|
||||
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)
|
||||
self:diffusealpha(0):sleep(0.13 * i):decelerate(0.6):diffusealpha(0.6)
|
||||
end;
|
||||
}
|
||||
}
|
||||
@@ -143,11 +144,11 @@ for ip, p in ipairs(GAMESTATE:GetHumanPlayers()) do
|
||||
else
|
||||
self:horizalign(left)
|
||||
end
|
||||
self:diffusealpha(0):sleep(0.1 * i):decelerate(0.9):diffusealpha(1)
|
||||
self:diffusealpha(0):sleep(0.1 * i):decelerate(0.6):diffusealpha(1)
|
||||
end;
|
||||
OffCommand=function(self)
|
||||
self:sleep(0.1 * i):decelerate(0.3):diffusealpha(0)
|
||||
end;
|
||||
self:sleep(0.07 * i):decelerate(0.3):diffusealpha(0)
|
||||
end;
|
||||
}
|
||||
end
|
||||
|
||||
@@ -155,7 +156,7 @@ for ip, p in ipairs(GAMESTATE:GetHumanPlayers()) do
|
||||
eval_parts[#eval_parts+1] = Def.ActorFrame{
|
||||
InitCommand=cmd(x,_screen.cx + grade_parts_offs;y,_screen.cy/1.91),
|
||||
|
||||
--Containers. todo: replace with, erm... not quads
|
||||
--Containers
|
||||
Def.Quad {
|
||||
InitCommand=cmd(zoomto,190,115;diffuse,ColorLightTone(PlayerColor(p));diffusebottomedge,color("#FEEFCA");),
|
||||
OnCommand=function(self)
|
||||
@@ -163,8 +164,9 @@ for ip, p in ipairs(GAMESTATE:GetHumanPlayers()) do
|
||||
end,
|
||||
OffCommand=cmd(decelerate,0.3;diffusealpha,0)
|
||||
},
|
||||
|
||||
Def.Quad {
|
||||
InitCommand=cmd(vertalign,top;y,60;zoomto,190,136;diffuse,color("#fce1a1");),
|
||||
InitCommand=cmd(vertalign,top;y,60+grade_area_offset;zoomto,190,136;diffuse,color("#fce1a1");),
|
||||
OnCommand=function(self)
|
||||
self:diffusealpha(0):decelerate(0.4):diffusealpha(0.4)
|
||||
end,
|
||||
@@ -201,7 +203,7 @@ for ip, p in ipairs(GAMESTATE:GetHumanPlayers()) do
|
||||
-- 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-59);diffuse,ColorMidTone(PlayerColor(p));zoom,1;shadowlength,1;maxwidth,180),
|
||||
InitCommand=cmd(horizalign,center;x,_screen.cx + (grade_parts_offs);y,(_screen.cy-59)+grade_area_offset;diffuse,ColorMidTone(PlayerColor(p));zoom,1;shadowlength,1;maxwidth,180),
|
||||
OnCommand=function(self)
|
||||
self:settext(GetPlScore(p, "primary")):diffusealpha(0):sleep(0.5):decelerate(0.3):diffusealpha(1)
|
||||
end;
|
||||
@@ -212,7 +214,7 @@ for ip, p in ipairs(GAMESTATE:GetHumanPlayers()) do
|
||||
-- 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-59)+35;diffuse,ColorDarkTone(PlayerColor(p));zoom,0.75;shadowlength,1),
|
||||
InitCommand=cmd(horizalign,center;x,_screen.cx + (grade_parts_offs);y,(_screen.cy-59)+35+grade_area_offset;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;
|
||||
@@ -223,7 +225,7 @@ for ip, p in ipairs(GAMESTATE:GetHumanPlayers()) do
|
||||
|
||||
eval_parts[#eval_parts+1] = Def.BitmapText {
|
||||
Font = "Common Condensed",
|
||||
InitCommand=cmd(horizalign,center;x,_screen.cx + (grade_parts_offs);y,(_screen.cy-50)+56;diffuse,ColorDarkTone(PlayerColor(p));zoom,0.75;shadowlength,1;maxwidth,180),
|
||||
InitCommand=cmd(horizalign,center;x,_screen.cx + (grade_parts_offs);y,(_screen.cy-50)+56+grade_area_offset;diffuse,ColorDarkTone(PlayerColor(p));zoom,0.75;shadowlength,1;maxwidth,180),
|
||||
OnCommand=function(self)
|
||||
local record = STATSMAN:GetCurStageStats():GetPlayerStageStats(p):GetPersonalHighScoreIndex()
|
||||
local hasPersonalRecord = record ~= -1
|
||||
@@ -237,13 +239,50 @@ for ip, p in ipairs(GAMESTATE:GetHumanPlayers()) do
|
||||
end;
|
||||
}
|
||||
|
||||
-- Other stats (holds, mines, etc.)
|
||||
for i, rc_type in ipairs(eval_radar.Types) do
|
||||
local performance = STATSMAN:GetCurStageStats():GetPlayerStageStats(p):GetRadarActual():GetValue( "RadarCategory_"..rc_type )
|
||||
local possible = STATSMAN:GetCurStageStats():GetPlayerStageStats(p):GetRadarPossible():GetValue( "RadarCategory_"..rc_type )
|
||||
local label = THEME:GetString("RadarCategory", rc_type)
|
||||
|
||||
eval_parts[#eval_parts+1] = Def.ActorFrame {
|
||||
InitCommand=function(self)
|
||||
self:x(_screen.cx + (grade_parts_offs))
|
||||
self:y((_screen.cy + 104 - 32) + (i-1)*32)
|
||||
end;
|
||||
OnCommand=function(self)
|
||||
self:diffusealpha(0):sleep(0.1 * i):decelerate(0.5):diffusealpha(1)
|
||||
end;
|
||||
OffCommand=function(self)
|
||||
self:sleep(0.13 * i):decelerate(0.6):diffusealpha(0)
|
||||
end;
|
||||
Def.Quad {
|
||||
InitCommand=cmd(zoomto,190,28;diffuse,color("#fce1a1");diffusealpha,0.4;);
|
||||
};
|
||||
Def.BitmapText {
|
||||
Font = "Common Condensed",
|
||||
InitCommand=cmd(zoom,0.8;x,-80;horizalign,left;diffuse,color("0,0,0,0.75");shadowlength,1;),
|
||||
BeginCommand=function(self)
|
||||
self:settext(label .. ":")
|
||||
end
|
||||
};
|
||||
Def.BitmapText {
|
||||
Font = "_overpass 36px",
|
||||
InitCommand=cmd(zoom,0.5;x,83;horizalign,right;maxwidth,200;diffuse,ColorDarkTone(PlayerColor(p));shadowlength,1;),
|
||||
BeginCommand=function(self)
|
||||
self:settext(performance .. "/" .. possible)
|
||||
end
|
||||
};
|
||||
};
|
||||
end;
|
||||
|
||||
-- Options
|
||||
eval_parts[#eval_parts+1] = Def.BitmapText {
|
||||
Font = "Common Condensed",
|
||||
InitCommand=cmd(horizalign,center;vertalign,top;x,_screen.cx + (grade_parts_offs);y,(_screen.cy+37);wrapwidthpixels,240;diffuse,ColorDarkTone(PlayerColor(p));zoom,0.75;shadowlength,1),
|
||||
InitCommand=cmd(horizalign,center;vertalign,top;x,_screen.cx + (grade_parts_offs);y,(_screen.cy+196);wrapwidthpixels,240;diffuse,ColorDarkTone(PlayerColor(p));zoom,0.75;shadowlength,1),
|
||||
OnCommand=function(self)
|
||||
self:settext(GAMESTATE:GetPlayerState(p):GetPlayerOptionsString(0))
|
||||
self:diffusealpha(0):sleep(0.8):decelerate(0.9):diffusealpha(1)
|
||||
self:diffusealpha(0):sleep(0.8):decelerate(0.6):diffusealpha(1)
|
||||
end;
|
||||
OffCommand=function(self)
|
||||
self:sleep(0.1):decelerate(0.3):diffusealpha(0)
|
||||
@@ -260,7 +299,7 @@ if GAMESTATE:IsHumanPlayer(PLAYER_1) == true 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-96;visible,not GAMESTATE:IsCourseMode(););
|
||||
InitCommand=cmd(horizalign,center;x,_screen.cx + grade_parts_offs;y,_screen.cy-96+grade_area_offset;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") .. {
|
||||
@@ -298,7 +337,7 @@ 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-96;visible,not GAMESTATE:IsCourseMode(););
|
||||
InitCommand=cmd(horizalign,center;x,_screen.cx + grade_parts_offs;y,_screen.cy-96+grade_area_offset;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") .. {
|
||||
@@ -361,5 +400,4 @@ if gameplay_pause_count > 0 then
|
||||
}
|
||||
end
|
||||
|
||||
return t;
|
||||
|
||||
return t;
|
||||
Reference in New Issue
Block a user