option icons working, new font format, more theme metrics cleanup

This commit is contained in:
Chris Danford
2002-09-03 22:31:06 +00:00
parent 106531a0f8
commit 7ab487072f
48 changed files with 350 additions and 286 deletions
+11
View File
@@ -20,6 +20,7 @@
#define TEXT_V_ALIGN THEME->GetMetricI("OptionIcon","TextVAlign")
#define TEXT_WIDTH THEME->GetMetricI("OptionIcon","TextWidth")
#define TEXT_ZOOM THEME->GetMetricF("OptionIcon","TextZoom")
#define UPPERCASE THEME->GetMetricB("OptionIcon","Uppercase")
OptionIcon::OptionIcon()
@@ -39,6 +40,16 @@ OptionIcon::OptionIcon()
void OptionIcon::Load( PlayerNumber pn, CString sText, bool bHeader )
{
static CString sStopWords[] = { "OFF", "VISIBLE", "VIVID" };
const int iNumStopWords = sizeof(sStopWords)/sizeof(sStopWords[0]);
for( int i=0; i<iNumStopWords; i++ )
if( sText == sStopWords[i] )
sText = "";
if( UPPERCASE )
sText.MakeUpper();
bool bVacant = (sText=="");
m_spr.SetState( pn*3 + (bHeader?0:(bVacant?1:2)) );