add retrobar for dance and kb7, remove kb7's default-p2

This commit is contained in:
AJ Kelly
2010-06-28 20:05:29 -05:00
parent e06b52bc90
commit 8f1f52d494
85 changed files with 309 additions and 108 deletions
+86
View File
@@ -0,0 +1,86 @@
-- from scratch, with various references.
local Noteskin = ... or {};
-- element redirs
Noteskin.ElementRedirs = {
-- ["element"] = "redir_element";
};
-- button redirs (since this is a bar noteskin, it's all the same)
Noteskin.ButtonRedirs = {
Left = "Bar";
UpLeft = "Bar";
Up = "Bar";
Down = "Bar";
UpRight = "Bar";
Right = "Bar";
};
-- things to blank out
Noteskin.Hide = {
-- ["element"] = true/false;
};
-- rotations
Noteskin.BaseRotX = {
Left = 0;
UpLeft = 0;
Up = 0;
Down = 0;
UpRight = 0;
Right = 0;
};
Noteskin.BaseRotY = {
Left = 0;
UpLeft = 0;
Up = 0;
Down = 0;
UpRight = 0;
Right = 0;
};
local function NoteskinLoader()
local Button = Var "Button"
local Element = Var "Element"
if Noteskin.Hide[Element] then
-- Return a blank element. If SpriteOnly is set, we need to return a
-- sprite; otherwise just return a dummy actor.
local t;
if Var "SpriteOnly" then
t = LoadActor( "_blank" );
else
t = Def.Actor {};
end
return t .. {
cmd(visible,false);
};
end;
-- load element and button, using redirs
local LoadElement = Noteskin.ElementRedirs[Element]
if not LoadElement then
LoadElement = Element;
end;
local LoadButton = Noteskin.ButtonRedirs[Button]
if not LoadButton then
LoadButton = Button;
end;
-- get path to thing
local sPath = NOTESKIN:GetPath( LoadButton, LoadElement );
-- make actor
local t = LoadActor( sPath );
-- apply rotation
t.BaseRotationX=Noteskin.BaseRotX[sButton]
t.BaseRotationY=Noteskin.BaseRotY[sButton]
return t;
end
Noteskin.Load = NoteskinLoader;
Noteskin.CommonLoad = NoteskinLoader;
return Noteskin;