From f894aa943fa4ec071a3278a240b9cddb30010a2b Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 3 Feb 2007 11:19:11 +0000 Subject: [PATCH] xml -> lua --- .../difficulties.lua | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 stepmania/Themes/default/BGAnimations/ScreenSelectMusic overlay/difficulties.lua diff --git a/stepmania/Themes/default/BGAnimations/ScreenSelectMusic overlay/difficulties.lua b/stepmania/Themes/default/BGAnimations/ScreenSelectMusic overlay/difficulties.lua new file mode 100644 index 0000000000..e292cffb63 --- /dev/null +++ b/stepmania/Themes/default/BGAnimations/ScreenSelectMusic overlay/difficulties.lua @@ -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 +};