diff --git a/stepmania/src/OptionsList.cpp b/stepmania/src/OptionsList.cpp index 6afdbf276a..8d71c423d9 100644 --- a/stepmania/src/OptionsList.cpp +++ b/stepmania/src/OptionsList.cpp @@ -15,6 +15,7 @@ #define MAX_ITEMS_BEFORE_SPLIT THEME->GetMetricI(m_sName,"MaxItemsBeforeSplit") #define ITEMS_SPLIT_WIDTH THEME->GetMetricF(m_sName,"ItemsSplitWidth") #define DIRECT_LINES THEME->GetMetric (m_sName,"DirectLines") +#define TOP_MENUS THEME->GetMetric (m_sName,"TopMenus") static const RString RESET_ROW = "ResetOptions"; @@ -182,6 +183,8 @@ OptionsList::~OptionsList() void OptionsList::Load( RString sType, PlayerNumber pn ) { + TOP_MENU.Load( sType, "TopMenu" ); + m_pn = pn; m_bStartIsDown = false; @@ -197,9 +200,9 @@ void OptionsList::Load( RString sType, PlayerNumber pn ) FOREACH( RString, asDirectLines, s ) m_setDirectRows.insert( *s ); - m_setTopMenus.insert( "Main" ); vector setToLoad; - setToLoad.insert( setToLoad.begin(), m_setTopMenus.begin(), m_setTopMenus.end() ); + split( TOP_MENUS, ",", setToLoad ); + m_setTopMenus.insert( setToLoad.begin(), setToLoad.end() ); while( !setToLoad.empty() ) { @@ -253,7 +256,7 @@ void OptionsList::Open() /* Push the initial menu. */ ASSERT( m_asMenuStack.size() == 0 ); - Push( "Main" ); + Push( TOP_MENU ); this->FinishTweening(); m_Row[!m_iCurrentRow].SetFromHandler( NULL ); diff --git a/stepmania/src/OptionsList.h b/stepmania/src/OptionsList.h index d45271d035..81ef741159 100644 --- a/stepmania/src/OptionsList.h +++ b/stepmania/src/OptionsList.h @@ -9,6 +9,7 @@ #include "BitmapText.h" #include "OptionsCursor.h" #include "CodeSet.h" +#include "ThemeMetric.h" class OptionsList; class OptionListRow: public ActorFrame @@ -59,6 +60,8 @@ public: bool Start(); /* return true if the last menu was popped in response to this press */ private: + ThemeMetric TOP_MENU; + void SelectItem( const RString &sRowName, int iMenuItem ); void MoveItem( const RString &sRowName, int iMove ); void SwitchMenu( int iDir );