Files
itgmania212121/Themes/default/BGAnimations/ScreenSelectMusic decorations/default.lua
T

99 lines
3.8 KiB
Lua
Raw Normal View History

2010-01-26 21:00:30 -06:00
local t = LoadFallbackB();
-- Legacy StepMania 4 Function
local function StepsDisplay(pn)
2008-03-31 04:38:13 +00:00
local function set(self, player)
self:SetFromGameState( player );
end
local t = Def.StepsDisplay {
InitCommand=cmd(Load,"StepsDisplay",GAMESTATE:GetPlayerState(pn););
2008-03-31 04:38:13 +00:00
};
if pn == PLAYER_1 then
t.CurrentStepsP1ChangedMessageCommand=function(self) set(self, pn); end;
t.CurrentTrailP1ChangedMessageCommand=function(self) set(self, pn); end;
else
t.CurrentStepsP2ChangedMessageCommand=function(self) set(self, pn); end;
t.CurrentTrailP2ChangedMessageCommand=function(self) set(self, pn); end;
end
return t;
end
2010-01-26 21:00:30 -06:00
-- Legacy StepMania 4 Function
2008-07-21 08:02:45 +00:00
for pn in ivalues(PlayerNumber) do
local MetricsName = "StepsDisplay" .. PlayerNumberToString(pn);
t[#t+1] = StepsDisplay(pn) .. {
2008-12-21 22:16:54 +00:00
InitCommand=function(self) self:player(pn); self:name(MetricsName); ActorUtil.LoadAllCommandsAndSetXY(self,Var "LoadingScreen"); end;
2010-01-26 21:00:30 -06:00
PlayerJoinedMessageCommand=function(self, params)
if params.Player == pn then
self:visible(true);
(cmd(zoom,0;bounceend,0.3;zoom,1))(self);
end;
end;
PlayerUnjoinedMessageCommand=function(self, params)
if params.Player == pn then
self:visible(true);
(cmd(bouncebegin,0.3;zoom,0))(self);
end;
end;
};
2008-07-21 08:02:45 +00:00
end
2010-01-26 21:00:30 -06:00
t[#t+1] = StandardDecorationFromFileOptional("BannerFrame","BannerFrame");
t[#t+1] = StandardDecorationFromFileOptional("DifficultyList","DifficultyList");
t[#t+1] = StandardDecorationFromFileOptional("CourseContentsList","CourseContentsList");
t[#t+1] = StandardDecorationFromFileOptional("BPMDisplay","BPMDisplay");
t[#t+1] = StandardDecorationFromFileOptional("BPMLabel","BPMLabel");
2008-03-31 04:38:13 +00:00
if not GAMESTATE:IsCourseMode() then
2010-01-26 21:00:30 -06:00
t[#t+1] = StandardDecorationFromFileOptional("NewSong","NewSong") .. {
-- ShowCommand=THEME:GetMetric(Var "LoadingScreen", "NewSongShowCommand" );
-- HideCommand=THEME:GetMetric(Var "LoadingScreen", "NewSongHideCommand" );
CurrentSongChangedMessageCommand=cmd(playcommand,"Set");
SetCommand=function(self)
-- local pTargetProfile;
local sSong;
-- Start!
if GAMESTATE:GetCurrentSong() then
if PROFILEMAN:IsSongNew(GAMESTATE:GetCurrentSong()) then
self:playcommand("Show");
else
self:playcommand("Hide");
end
else
self:playcommand("Hide");
end
end;
2008-03-31 04:38:13 +00:00
};
2010-01-26 21:00:30 -06:00
t[#t+1] = StandardDecorationFromFileOptional("StageDisplay","StageDisplay");
end;
t[#t+1] = StandardDecorationFromFileOptional("SortOrder","SortOrderText") .. {
BeginCommand=cmd(playcommand,"Set");
SortOrderChangedMessageCommand=cmd(playcommand,"Set";);
SetCommand=function(self)
local s = SortOrderToLocalizedString( GAMESTATE:GetSortOrder() );
self:settext( s );
self:playcommand("Sort");
end;
2008-03-31 04:38:13 +00:00
};
2010-01-26 21:00:30 -06:00
t[#t+1] = StandardDecorationFromFileOptional("SortOrderFrame","SortOrderFrame") .. {
--[[ BeginCommand=cmd(playcommand,"Set");
SortOrderChangedMessageCommand=cmd(playcommand,"Set";);
SetCommand=function(self)
local s = SortOrderToLocalizedString( GAMESTATE:GetSortOrder() );
self:settext( s );
self:playcommand("Sort");
end; --]]
};
t[#t+1] = StandardDecorationFromFileOptional("SongOptionsFrame","SongOptionsFrame") .. {
ShowPressStartForOptionsCommand=THEME:GetMetric(Var "LoadingScreen","SongOptionsFrameShowCommand");
ShowEnteringOptionsCommand=THEME:GetMetric(Var "LoadingScreen","SongOptionsFrameEnterCommand");
HidePressStartForOptionsCommand=THEME:GetMetric(Var "LoadingScreen","SongOptionsFrameHideCommand");
};
t[#t+1] = StandardDecorationFromFileOptional("SongOptions","SongOptionsText") .. {
ShowPressStartForOptionsCommand=THEME:GetMetric(Var "LoadingScreen","SongOptionsShowCommand");
ShowEnteringOptionsCommand=THEME:GetMetric(Var "LoadingScreen","SongOptionsEnterCommand");
HidePressStartForOptionsCommand=THEME:GetMetric(Var "LoadingScreen","SongOptionsHideCommand");
};
return t