move OptionTitle into OptionRowHandler
This commit is contained in:
@@ -55,20 +55,6 @@ void OptionRow::PrepareItemText( RString &s ) const
|
|||||||
s.MakeUpper();
|
s.MakeUpper();
|
||||||
}
|
}
|
||||||
|
|
||||||
RString OptionRow::OptionTitle( RString s ) const
|
|
||||||
{
|
|
||||||
bool bTheme = false;
|
|
||||||
|
|
||||||
// HACK: Always theme the NEXT_ROW and EXIT items, even if metrics says not to theme.
|
|
||||||
if( m_pHand->m_Def.m_bAllowThemeTitle )
|
|
||||||
bTheme = true;
|
|
||||||
|
|
||||||
if( s.empty() )
|
|
||||||
return s;
|
|
||||||
|
|
||||||
return bTheme ? THEME->GetString("OptionTitles",s) : s;
|
|
||||||
}
|
|
||||||
|
|
||||||
RString ITEMS_LONG_ROW_X_NAME( size_t p ) { return ssprintf("ItemsLongRowP%dX",int(p+1)); }
|
RString ITEMS_LONG_ROW_X_NAME( size_t p ) { return ssprintf("ItemsLongRowP%dX",int(p+1)); }
|
||||||
RString ICONS_X_NAME( size_t p ) { return ssprintf("IconsP%dX",int(p+1)); }
|
RString ICONS_X_NAME( size_t p ) { return ssprintf("IconsP%dX",int(p+1)); }
|
||||||
|
|
||||||
@@ -222,11 +208,10 @@ void OptionRow::ChoicesChanged()
|
|||||||
|
|
||||||
RString OptionRow::GetRowTitle() const
|
RString OptionRow::GetRowTitle() const
|
||||||
{
|
{
|
||||||
RString sLineName = m_pHand->m_Def.m_sName;
|
RString sTitle = m_pHand->OptionTitle();
|
||||||
RString sTitle = OptionTitle(sLineName);
|
|
||||||
|
|
||||||
// HACK: tack the BPM onto the name of the speed line
|
// HACK: tack the BPM onto the name of the speed line
|
||||||
if( sLineName.CompareNoCase("speed")==0 )
|
if( m_pHand->m_Def.m_sName.CompareNoCase("speed")==0 )
|
||||||
{
|
{
|
||||||
bool bShowBpmInSpeedTitle = m_pParentType->SHOW_BPM_IN_SPEED_TITLE;
|
bool bShowBpmInSpeedTitle = m_pParentType->SHOW_BPM_IN_SPEED_TITLE;
|
||||||
|
|
||||||
|
|||||||
@@ -186,7 +186,6 @@ public:
|
|||||||
bool GetFirstItemGoesDown() const { return m_bFirstItemGoesDown; }
|
bool GetFirstItemGoesDown() const { return m_bFirstItemGoesDown; }
|
||||||
|
|
||||||
void PrepareItemText( RString &s ) const;
|
void PrepareItemText( RString &s ) const;
|
||||||
RString OptionTitle( RString s ) const;
|
|
||||||
|
|
||||||
void SetExitText( RString sExitText );
|
void SetExitText( RString sExitText );
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,21 @@
|
|||||||
#define ENTRY_MODE(s,i) THEME->GetMetric ("ScreenOptionsMaster",ssprintf("%s,%i",(s).c_str(),(i+1)))
|
#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")
|
#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
|
void OptionRowHandler::GetIconTextAndGameCommand( int iFirstSelection, RString &sIconTextOut, GameCommand &gcOut ) const
|
||||||
{
|
{
|
||||||
sIconTextOut = "";
|
sIconTextOut = "";
|
||||||
@@ -1268,7 +1283,7 @@ OptionRowHandler* OptionRowHandlerUtil::MakeSimple( const MenuRowDef &mr )
|
|||||||
pHand->m_Def.m_bOneChoiceForAllPlayers = true;
|
pHand->m_Def.m_bOneChoiceForAllPlayers = true;
|
||||||
pHand->m_Def.m_selectType = SELECT_ONE;
|
pHand->m_Def.m_selectType = SELECT_ONE;
|
||||||
pHand->m_Def.m_layoutType = LAYOUT_SHOW_ONE_IN_ROW;
|
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;
|
pHand->m_Def.m_vsChoices = mr.choices;
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,8 @@ public:
|
|||||||
m_cmds = cmds;
|
m_cmds = cmds;
|
||||||
this->LoadInternal( cmds );
|
this->LoadInternal( cmds );
|
||||||
}
|
}
|
||||||
|
RString OptionTitle() const;
|
||||||
|
|
||||||
virtual void LoadInternal( const Commands &cmds ) { }
|
virtual void LoadInternal( const Commands &cmds ) { }
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user