OptionRowHandlers -> m_OptionRowHandlers
This commit is contained in:
@@ -74,13 +74,13 @@ void ScreenOptionsMaster::Init()
|
|||||||
|
|
||||||
vector<OptionRowDefinition> OptionRowDefs;
|
vector<OptionRowDefinition> OptionRowDefs;
|
||||||
OptionRowDefs.resize( asLineNames.size() );
|
OptionRowDefs.resize( asLineNames.size() );
|
||||||
OptionRowHandlers.resize( asLineNames.size() );
|
m_OptionRowHandlers.resize( asLineNames.size() );
|
||||||
for( unsigned i = 0; i < asLineNames.size(); ++i )
|
for( unsigned i = 0; i < asLineNames.size(); ++i )
|
||||||
{
|
{
|
||||||
CString sLineName = asLineNames[i];
|
CString sLineName = asLineNames[i];
|
||||||
OptionRowDefinition &def = OptionRowDefs[i];
|
OptionRowDefinition &def = OptionRowDefs[i];
|
||||||
CString sRowCommands = LINE(sLineName);
|
CString sRowCommands = LINE(sLineName);
|
||||||
OptionRowHandler* &pHand = OptionRowHandlers[i];
|
OptionRowHandler* &pHand = m_OptionRowHandlers[i];
|
||||||
pHand = NULL;
|
pHand = NULL;
|
||||||
|
|
||||||
Commands vCommands;
|
Commands vCommands;
|
||||||
@@ -94,18 +94,19 @@ void ScreenOptionsMaster::Init()
|
|||||||
RageException::Throw( "Invalid OptionRowHandler '%s' in %s::Line%i", command.GetOriginalCommandString().c_str(), m_sName.c_str(), i );
|
RageException::Throw( "Invalid OptionRowHandler '%s' in %s::Line%i", command.GetOriginalCommandString().c_str(), m_sName.c_str(), i );
|
||||||
}
|
}
|
||||||
|
|
||||||
ASSERT( OptionRowHandlers.size() == asLineNames.size() );
|
ASSERT( m_OptionRowHandlers.size() == asLineNames.size() );
|
||||||
|
|
||||||
InitMenu( OptionRowDefs, OptionRowHandlers );
|
|
||||||
|
InitMenu( OptionRowDefs, m_OptionRowHandlers );
|
||||||
}
|
}
|
||||||
|
|
||||||
ScreenOptionsMaster::~ScreenOptionsMaster()
|
ScreenOptionsMaster::~ScreenOptionsMaster()
|
||||||
{
|
{
|
||||||
FOREACH( OptionRow*, m_pRows, r )
|
FOREACH( OptionRow*, m_pRows, r )
|
||||||
(*r)->DetachHandler();
|
(*r)->DetachHandler();
|
||||||
FOREACH( OptionRowHandler*, OptionRowHandlers, h )
|
FOREACH( OptionRowHandler*, m_OptionRowHandlers, h )
|
||||||
SAFE_DELETE( *h );
|
SAFE_DELETE( *h );
|
||||||
OptionRowHandlers.clear();
|
m_OptionRowHandlers.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenOptionsMaster::ImportOptions( int r, const vector<PlayerNumber> &vpns )
|
void ScreenOptionsMaster::ImportOptions( int r, const vector<PlayerNumber> &vpns )
|
||||||
@@ -146,7 +147,7 @@ void ScreenOptionsMaster::BeginFadingOut()
|
|||||||
iChoice--;
|
iChoice--;
|
||||||
if( iChoice != -1 ) // not the "goes down" item
|
if( iChoice != -1 ) // not the "goes down" item
|
||||||
{
|
{
|
||||||
OptionRowHandler *pHand = OptionRowHandlers[iCurRow];
|
OptionRowHandler *pHand = m_OptionRowHandlers[iCurRow];
|
||||||
m_bExportWillSetANewScreen = pHand->HasScreen( iChoice );
|
m_bExportWillSetANewScreen = pHand->HasScreen( iChoice );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -168,8 +169,9 @@ void ScreenOptionsMaster::RefreshIcons( int r, PlayerNumber pn )
|
|||||||
// find first selection and whether multiple are selected
|
// find first selection and whether multiple are selected
|
||||||
int iFirstSelection = row.GetOneSelection( pn, true );
|
int iFirstSelection = row.GetOneSelection( pn, true );
|
||||||
|
|
||||||
// set icon name
|
// set icon name and bullet
|
||||||
CString sIcon;
|
CString sIcon;
|
||||||
|
GameCommand gc;
|
||||||
|
|
||||||
if( iFirstSelection == -1 )
|
if( iFirstSelection == -1 )
|
||||||
{
|
{
|
||||||
@@ -177,8 +179,9 @@ void ScreenOptionsMaster::RefreshIcons( int r, PlayerNumber pn )
|
|||||||
}
|
}
|
||||||
else if( iFirstSelection != -1 )
|
else if( iFirstSelection != -1 )
|
||||||
{
|
{
|
||||||
const OptionRowHandler *pHand = OptionRowHandlers[r];
|
const OptionRowHandler *pHand = m_OptionRowHandlers[r];
|
||||||
sIcon = pHand->GetIconText( def, iFirstSelection+(m_OptionsNavigation==NAV_TOGGLE_THREE_KEY?-1:0) );
|
int iSelection = iFirstSelection+(m_OptionsNavigation==NAV_TOGGLE_THREE_KEY?-1:0);
|
||||||
|
pHand->GetIconTextAndGameCommand( def, iSelection, sIcon, gc );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -186,7 +189,7 @@ void ScreenOptionsMaster::RefreshIcons( int r, PlayerNumber pn )
|
|||||||
if( def.m_bOneChoiceForAllPlayers )
|
if( def.m_bOneChoiceForAllPlayers )
|
||||||
sIcon = "";
|
sIcon = "";
|
||||||
|
|
||||||
SetOptionIcon( pn, r, sIcon );
|
SetOptionIcon( pn, r, sIcon, gc );
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenOptionsMaster::HandleScreenMessage( const ScreenMessage SM )
|
void ScreenOptionsMaster::HandleScreenMessage( const ScreenMessage SM )
|
||||||
@@ -200,9 +203,9 @@ void ScreenOptionsMaster::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
|
|
||||||
CHECKPOINT;
|
CHECKPOINT;
|
||||||
|
|
||||||
for( unsigned r = 0; r < OptionRowHandlers.size(); ++r )
|
for( unsigned r = 0; r < m_OptionRowHandlers.size(); ++r )
|
||||||
{
|
{
|
||||||
CHECKPOINT_M( ssprintf("%i/%i", r, int(OptionRowHandlers.size())) );
|
CHECKPOINT_M( ssprintf("%i/%i", r, int(m_OptionRowHandlers.size())) );
|
||||||
|
|
||||||
vector<PlayerNumber> vpns;
|
vector<PlayerNumber> vpns;
|
||||||
FOREACH_OptionsPlayer( p )
|
FOREACH_OptionsPlayer( p )
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ protected:
|
|||||||
int m_iChangeMask;
|
int m_iChangeMask;
|
||||||
bool m_bExportWillSetANewScreen; // from an OptionRowHandler
|
bool m_bExportWillSetANewScreen; // from an OptionRowHandler
|
||||||
|
|
||||||
vector<OptionRowHandler*> OptionRowHandlers;
|
vector<OptionRowHandler*> m_OptionRowHandlers;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void HandleScreenMessage( const ScreenMessage SM );
|
virtual void HandleScreenMessage( const ScreenMessage SM );
|
||||||
|
|||||||
Reference in New Issue
Block a user