local jl = Var "JudgmentLine";

local jlToFrameNum = {
	JudgmentLine_W1 = 0,
	JudgmentLine_W2 = 1,
	JudgmentLine_W3 = 2,
	JudgmentLine_W4 = 3,
	JudgmentLine_W5 = 4,
	JudgmentLine_Miss = 5,
	JudgmentLine_Held = 6,
	JudgmentLine_MaxCombo = 7, -- max combo is in the bonus frame though
};
-- Q: If the Max Combo line isn't used, why didn't you edit the graphic to remove the empty space?
-- A: it was 128px tall, which is a perfect texture size. If I cropped the graphic,
-- it would just be put into a 256x128 texture anyways, so I figured I could save
-- StepMania some time and just leave it at 128px tall. (Note that textures always
-- expand to fill powers of two, even when you don't give them dimensions as such.)

return Def.ActorFrame{
	LoadActor("_judge labels")..{
		InitCommand=cmd(animate,false;setstate,jlToFrameNum[jl]);
	};
};