xml -> lua

This commit is contained in:
Glenn Maynard
2007-02-03 11:19:11 +00:00
parent fc9d79d7b2
commit f894aa943f
@@ -0,0 +1,23 @@
local children = {};
for idx, diff in pairs(Difficulty) do -- 0, Difficulty_Beginner
children[#children+1] = LoadActor( "_DifficultyDisplay 6x1" ) .. {
InitCommand=cmd(pause;setstate,Difficulty:Reverse()[diff]);
ShowCommand=cmd(stoptweening;linear,0.1;diffusealpha,1);
HideCommand=cmd(stoptweening;linear,0.1;diffusealpha,0);
BeginCommand=cmd(y,16*idx);
SetCommand=function(self)
local song = GAMESTATE:GetCurrentSong()
local st = GAMESTATE:GetCurrentStyle():GetStepsType()
local bHasStepsTypeAndDifficulty =
song and song:HasStepsTypeAndDifficulty( st, diff );
self:playcommand( bHasStepsTypeAndDifficulty and "Show" or "Hide" );
end;
CurrentSongChangedMessageCommand=cmd(playcommand,"Set");
};
end
return Def.ActorFrame {
children = children
};