<Layer
 Type="Sprite"
 InitCommand="x,SCREEN_CENTER_X+0;y,SCREEN_BOTTOM-27		;scaletoclipped,176,55;"
 OnCommand="diffusealpha,0.2"
 OffCommand=""
 SetCommand='%function(self)
  local song = GAMESTATE:GetCurrentSong()
  if song then
   self:LoadFromSongBanner( song )
  end
  end'
 CurrentSongChangedMessageCommand="playcommand,Set"
/>






<Layer Type="Quad" OnCommand="%function(self) self:hidden(1) self:sleep(0.5); self:queuecommand('Register');
 
-- Credit to TaroNuke for all of this code to make the PA counter work. You are amazing! :D
 
--initialize all judgment counts to 0 in case we want it for anything
for i=1,6 do
 _G['P1W'..i] = 0
 _G['P2W'..i] = 0
end
self:queuecommand('Update') end"
 
RegisterCommand="%function(self)
   if SCREENMAN:GetTopScreen():GetChild('PlayerP1') then
       SCREENMAN:GetTopScreen():GetChild('PlayerP1'):GetChild('Judgment'):aux(1);
   end
   if SCREENMAN:GetTopScreen():GetChild('PlayerP2') then
       SCREENMAN:GetTopScreen():GetChild('PlayerP2'):GetChild('Judgment'):aux(2);
   end
end"
 
P0W1MessageCommand="%function(self)
    P1W1 = P1W1+1;
if gradecount_P1 then
gradecount_P1:x(150); --position it
gradecount_P1:y(SCREEN_CENTER_Y);
gradecount_P1:horizalign('right');
gradecount_P1:settext(P1W1..'\n'..P1W2..'\n'..P1W3..'\n'..P1W4..'\n'..P1W5..'\n'..P1W6); --set text to the value        
end
end"
 
P0W2MessageCommand="%function(self)
    P1W2 = P1W2+1;
if gradecount_P1 then
gradecount_P1:x(150); --position it
gradecount_P1:y(SCREEN_CENTER_Y);
gradecount_P1:horizalign('right');
gradecount_P1:settext(P1W1..'\n'..P1W2..'\n'..P1W3..'\n'..P1W4..'\n'..P1W5..'\n'..P1W6); --set text to the value        
end
end"
 
P0W3MessageCommand="%function(self)
    P1W3 = P1W3+1;
if gradecount_P1 then
gradecount_P1:x(150); --position it
gradecount_P1:y(SCREEN_CENTER_Y);
gradecount_P1:horizalign('right');
gradecount_P1:settext(P1W1..'\n'..P1W2..'\n'..P1W3..'\n'..P1W4..'\n'..P1W5..'\n'..P1W6); --set text to the value        
end
end"
 
P0W4MessageCommand="%function(self)
    P1W4 = P1W4+1;
if gradecount_P1 then
gradecount_P1:x(150); --position it
gradecount_P1:y(SCREEN_CENTER_Y);
gradecount_P1:horizalign('right');
gradecount_P1:settext(P1W1..'\n'..P1W2..'\n'..P1W3..'\n'..P1W4..'\n'..P1W5..'\n'..P1W6); --set text to the value        
end
end"
 
P0W5MessageCommand="%function(self)
    P1W5 = P1W5+1;
if gradecount_P1 then
gradecount_P1:x(150); --position it
gradecount_P1:y(SCREEN_CENTER_Y);
gradecount_P1:horizalign('right');
gradecount_P1:settext(P1W1..'\n'..P1W2..'\n'..P1W3..'\n'..P1W4..'\n'..P1W5..'\n'..P1W6); --set text to the value        
end
end"
 
P0W6MessageCommand="%function(self)
    P1W6 = P1W6+1;
if gradecount_P1 then
gradecount_P1:x(150); --position it
gradecount_P1:y(SCREEN_CENTER_Y);
gradecount_P1:horizalign('right');
gradecount_P1:settext(P1W1..'\n'..P1W2..'\n'..P1W3..'\n'..P1W4..'\n'..P1W5..'\n'..P1W6); --set text to the value       
end
end"/> 
 
<Layer File="_Arial 14 Shadow" Text="" OnCommand="zoom,0.5;" InitCommand="%function(self) gradecount_P1 = self; end" />
 
-- added the judgments separately even though I could technically concatenate them within the counting code -Halo
<Layer File="_Arial 14 Shadow" Text="Marvelous: " OnCommand="zoom,0.5;y,SCREEN_CENTER_Y-35;x,65" />
<Layer File="_Arial 14 Shadow" Text="Perfect: " OnCommand="zoom,0.5;y,SCREEN_CENTER_Y-21;x,74" />
<Layer File="_Arial 14 Shadow" Text="Great: " OnCommand="zoom,0.5;y,SCREEN_CENTER_Y-7;x,79" />
<Layer File="_Arial 14 Shadow" Text="Good: " OnCommand="zoom,0.5;y,SCREEN_CENTER_Y+7;x,80" />
<Layer File="_Arial 14 Shadow" Text="Boo: " OnCommand="zoom,0.5;y,SCREEN_CENTER_Y+21;x,84" />
<Layer File="_Arial 14 Shadow" Text="Miss: " OnCommand="zoom,0.5;y,SCREEN_CENTER_Y+35;x,83" />






<Layer File="marv"
 OnCommand="zoom,0.5;y,SCREEN_CENTER_Y+109;x,5" />

<Layer File="perf"
 OnCommand="zoom,0.5;y,SCREEN_CENTER_Y+122;x,5" />

<Layer File="great" 
OnCommand="zoom,0.5;y,SCREEN_CENTER_Y+135;x,5" />

<Layer File="good"
OnCommand="zoom,0.5;y,SCREEN_CENTER_Y+148;x,5" />

<Layer File="boo" 
OnCommand="zoom,0.5;y,SCREEN_CENTER_Y+161;x,5" />

<Layer File="miss"
OnCommand="zoom,0.5;y,SCREEN_CENTER_Y+174;x,5" />