Some theme bug fixes.

This commit is contained in:
AJ Kelly
2010-05-12 11:47:29 -05:00
parent 97749ff421
commit 42e2d09d90
2 changed files with 19 additions and 2 deletions
@@ -53,7 +53,12 @@ t[#t+1] = StandardDecorationFromFileOptional("SongTime","SongTime") .. {
curSelection = GAMESTATE:GetCurrentCourse();
self:playcommand("Reset");
if curSelection then
length = curSelection:GetTotalSeconds(GAMESTATE:GetCurrentStyle():GetStepsType());
local trail = GAMESTATE:GetCurrentTrail(GAMESTATE:GetMasterPlayerNumber());
if trail then
length = TrailUtil.GetTotalSeconds(trail);
else
length = 0.0;
end;
else
length = 0.0;
end;
@@ -78,6 +83,8 @@ t[#t+1] = StandardDecorationFromFileOptional("SongTime","SongTime") .. {
end;
CurrentSongChangedMessageCommand=cmd(playcommand,"Set");
CurrentCourseChangedMessageCommand=cmd(playcommand,"Set");
CurrentTrailP1ChangedMessageCommand=cmd(playcommand,"Set");
CurrentTrailP2ChangedMessageCommand=cmd(playcommand,"Set");
}
if not GAMESTATE:IsCourseMode() then
@@ -36,7 +36,17 @@ return Def.CourseContentsList {
InitCommand=cmd(x,-96;y,2;Load,"TextBanner";SetFromString,"", "", "", "", "", "");
SetSongCommand=function(self, params)
if params.Song then
self:SetFromSong( params.Song );
if GAMESTATE:GetCurrentCourse():GetDisplayFullTitle() == "Abomination" then
if params.Number % 2 ~= 0 then
-- turkey march
local artist = params.Song:GetDisplayArtist();
self:SetFromString( "Turkey", "", "", "", artist, "" );
else
self:SetFromSong( params.Song );
end;
else
self:SetFromSong( params.Song );
end;
self:diffuse( SONGMAN:GetSongColor(params.Song) );
-- self:glow("1,1,1,0.5");
else