add NavigationMode

(OptionMenuFlags predated metric fallback logic, where we didn't
want to add a ton of flags that we'd have to duplicate in a bunch
of screens.)
This commit is contained in:
Glenn Maynard
2006-01-16 03:25:30 +00:00
parent b7aef41e4b
commit 06e94c8b8c
+4 -16
View File
@@ -17,10 +17,10 @@
#include "CommonMetrics.h" #include "CommonMetrics.h"
#define LINE_NAMES THEME->GetMetric (m_sName,"LineNames") #define LINE_NAMES THEME->GetMetric (m_sName,"LineNames")
#define OPTION_MENU_FLAGS THEME->GetMetric (m_sName,"OptionMenuFlags")
#define LINE(sLineName) THEME->GetMetric (m_sName,ssprintf("Line%s",sLineName.c_str())) #define LINE(sLineName) THEME->GetMetric (m_sName,ssprintf("Line%s",sLineName.c_str()))
#define FORCE_ALL_PLAYERS THEME->GetMetricB(m_sName,"ForceAllPlayers") #define FORCE_ALL_PLAYERS THEME->GetMetricB(m_sName,"ForceAllPlayers")
#define INPUT_MODE THEME->GetMetric (m_sName,"InputMode") #define INPUT_MODE THEME->GetMetric (m_sName,"InputMode")
#define NAVIGATION_MODE THEME->GetMetric (m_sName,"NavigationMode")
REGISTER_SCREEN_CLASS( ScreenOptionsMaster ); REGISTER_SCREEN_CLASS( ScreenOptionsMaster );
@@ -32,10 +32,6 @@ void ScreenOptionsMaster::Init()
if( asLineNames.empty() ) if( asLineNames.empty() )
RageException::Throw( "%s::LineNames is empty.", m_sName.c_str() ); RageException::Throw( "%s::LineNames is empty.", m_sName.c_str() );
vector<CString> Flags;
split( OPTION_MENU_FLAGS, ";", Flags, true );
if( FORCE_ALL_PLAYERS ) if( FORCE_ALL_PLAYERS )
{ {
FOREACH_PlayerNumber( pn ) FOREACH_PlayerNumber( pn )
@@ -43,18 +39,10 @@ void ScreenOptionsMaster::Init()
GAMESTATE->m_MasterPlayerNumber = PLAYER_1; GAMESTATE->m_MasterPlayerNumber = PLAYER_1;
} }
for( unsigned i = 0; i < Flags.size(); ++i ) if( NAVIGATION_MODE == "toggle" )
{
CString sFlag = Flags[i];
sFlag.MakeLower();
if( sFlag == "smnavigation" )
SetNavigation( NAV_THREE_KEY_MENU );
else if( sFlag == "toggle" )
SetNavigation( PREFSMAN->m_bArcadeOptionsNavigation? NAV_TOGGLE_THREE_KEY:NAV_TOGGLE_FIVE_KEY ); SetNavigation( PREFSMAN->m_bArcadeOptionsNavigation? NAV_TOGGLE_THREE_KEY:NAV_TOGGLE_FIVE_KEY );
else else if( NAVIGATION_MODE == "menu" )
RageException::Throw( "Unknown flag \"%s\"", sFlag.c_str() ); SetNavigation( NAV_THREE_KEY_MENU );
}
SetInputMode( StringToInputMode(INPUT_MODE) ); SetInputMode( StringToInputMode(INPUT_MODE) );