remove DifficultyIcon, use DifficultyDisplay in gameplay, DifficultyListRow -> DifficultyDisplayListRow to make inheritance clear

This commit is contained in:
Chris Danford
2008-03-24 04:07:46 +00:00
parent 71c8f8b2b2
commit f6b692823d
12 changed files with 42 additions and 33 deletions
@@ -0,0 +1,34 @@
return Def.ActorFrame {
SetCommand=function(self,param)
local Steps = param.Steps;
local StepsType;
if Steps then
StepsType = Steps:GetStepsType();
end
--Trace( StepsType );
self:GetChild("IconSingle"):visible( StepsType == "StepsType_Pump_Single" );
self:GetChild("IconDouble"):visible( StepsType == "StepsType_Pump_Double" );
end;
LoadFont( "_venacti bold 26" ) .. {
Text="XXXX";
InitCommand=cmd(x,-110;y,-1;zoom,.5;shadowlengthx,0;shadowlengthy,2;shadowcolor,color("#00000077"););
SetCommand=function(self,param)
local s = DifficultyAndStepsTypeToLocalizedString( param.Difficulty, param.StepsType );
if param.Difficulty == "Difficulty_Edit" then
s = param.EditDescription;
end
s = string.upper(s); -- TODO: string.upper doesn't work correctly for French
self:settext( s );
local c = DifficultyAndStepsTypeToColor( param.Difficulty, param.StepsType );
self:diffuse( c );
end;
};
LoadActor( THEME:GetPathG("","_StepsType icon single") ) .. {
Name="IconSingle";
InitCommand=cmd(x,100;y,2;;visible,false);
};
LoadActor( THEME:GetPathG("","_StepsType icon double") ) .. {
Name="IconDouble";
InitCommand=cmd(x,100;y,2;visible,false);
};
};