[ModIcon] Added StopWords metric.
This commit is contained in:
@@ -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]
|
||||
|
||||
@@ -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
@@ -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" );
|
||||
|
||||
@@ -21,6 +21,8 @@ protected:
|
||||
AutoActor m_sprEmpty;
|
||||
|
||||
ThemeMetric<int> CROP_TEXT_TO_WIDTH;
|
||||
ThemeMetric<RString> STOP_WORDS;
|
||||
vector<RString> m_vStopWords;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user