move OptionTitle into OptionRowHandler

This commit is contained in:
Glenn Maynard
2006-09-01 04:29:24 +00:00
parent 0630367edc
commit 3f468cb30a
4 changed files with 20 additions and 19 deletions
+16 -1
View File
@@ -28,6 +28,21 @@
#define ENTRY_MODE(s,i) THEME->GetMetric ("ScreenOptionsMaster",ssprintf("%s,%i",(s).c_str(),(i+1)))
#define ENTRY_DEFAULT(s) THEME->GetMetric ("ScreenOptionsMaster",(s) + "Default")
RString OptionRowHandler::OptionTitle() const
{
bool bTheme = false;
// HACK: Always theme the NEXT_ROW and EXIT items, even if metrics says not to theme.
if( m_Def.m_bAllowThemeTitle )
bTheme = true;
RString s = m_Def.m_sName;
if( s.empty() )
return s;
return bTheme ? THEME->GetString("OptionTitles",s) : s;
}
void OptionRowHandler::GetIconTextAndGameCommand( int iFirstSelection, RString &sIconTextOut, GameCommand &gcOut ) const
{
sIconTextOut = "";
@@ -1268,7 +1283,7 @@ OptionRowHandler* OptionRowHandlerUtil::MakeSimple( const MenuRowDef &mr )
pHand->m_Def.m_bOneChoiceForAllPlayers = true;
pHand->m_Def.m_selectType = SELECT_ONE;
pHand->m_Def.m_layoutType = LAYOUT_SHOW_ONE_IN_ROW;
pHand->m_Def.m_bExportOnChange = false;
pHand->m_Def.m_bExportOnChange = false;//true;
pHand->m_Def.m_vsChoices = mr.choices;