[ModIcon] Added StopWords metric.

This commit is contained in:
AJ Kelly
2011-05-14 22:58:42 -05:00
parent f1bc24160b
commit 87148206a7
4 changed files with 9 additions and 4 deletions
+1
View File
@@ -10,6 +10,7 @@ StepMania 5.0 $NEXT | 20110xyy
2011/05/14
----------
* [ModIcon] Added StopWords metric. [AJ]
* [ScreenSelectMaster] Add "ScreenEmpty" param to MenuStartP# when the GameCommand
doesn't set a screen. [AJ]
* [StepsDisplay] Added MeterFormatString metric. [AJ]
+1
View File
@@ -4036,6 +4036,7 @@ TextX=0
TextY=0
TextOnCommand=maxwidth,40;uppercase,true;shadowlength,0;diffuse,color("#f6ff00")
CropTextToWidth=50
StopWords="1X,default,Overhead,Off"
[ModIconSelectMusic]
Fallback="ModIcon"
+5 -4
View File
@@ -40,11 +40,9 @@ void ModIcon::Load( RString sMetricsGroup )
CROP_TEXT_TO_WIDTH.Load( sMetricsGroup, "CropTextToWidth" );
// stop words
/*
STOP_WORDS.Load( sMetricsGroup, "StopWords" );
m_vStopWords.empty();
split(STOP_WORDS, ",", m_vStopWords);
*/
Set("");
}
@@ -54,6 +52,7 @@ void ModIcon::Set( const RString &_sText )
RString sText = _sText;
// todo: make these metricable -aj
/*
static const RString sStopWords[] =
{
"1X",
@@ -61,9 +60,11 @@ void ModIcon::Set( const RString &_sText )
"OVERHEAD",
"OFF",
};
*/
for( unsigned i=0; i<ARRAYLEN(sStopWords); i++ )
if( sText.EqualsNoCase(sStopWords[i]) )
//for( unsigned i=0; i<ARRAYLEN(sStopWords); i++ )
for( unsigned i = 0; i < m_vStopWords.size(); i++ )
if( sText.EqualsNoCase(m_vStopWords[i]) )
sText = "";
sText.Replace( " ", "\n" );
+2
View File
@@ -21,6 +21,8 @@ protected:
AutoActor m_sprEmpty;
ThemeMetric<int> CROP_TEXT_TO_WIDTH;
ThemeMetric<RString> STOP_WORDS;
vector<RString> m_vStopWords;
};
#endif