support bOneChoiceForAllPlayers
This commit is contained in:
@@ -168,6 +168,7 @@ void OptionListRow::PositionCursor( Actor *pCursor, int iSelection )
|
|||||||
OptionsList::OptionsList()
|
OptionsList::OptionsList()
|
||||||
{
|
{
|
||||||
m_iCurrentRow = 0;
|
m_iCurrentRow = 0;
|
||||||
|
m_pLinked = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
OptionsList::~OptionsList()
|
OptionsList::~OptionsList()
|
||||||
@@ -595,13 +596,24 @@ void OptionsList::SelectItem( const RString &sRowName, int iMenuItem )
|
|||||||
bSelections[iMenuItem] = true;
|
bSelections[iMenuItem] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( pHandler->m_Def.m_bOneChoiceForAllPlayers && m_pLinked != NULL )
|
||||||
|
{
|
||||||
|
vector<bool> &bLinkedSelections = m_pLinked->m_bSelections[sRowName];
|
||||||
|
bLinkedSelections = bSelections;
|
||||||
|
if( m_pLinked->IsOpened() )
|
||||||
|
m_pLinked->UpdateMenuFromSelections();
|
||||||
|
}
|
||||||
|
|
||||||
ExportRow( sRowName );
|
ExportRow( sRowName );
|
||||||
|
|
||||||
{
|
UpdateMenuFromSelections();
|
||||||
const vector<bool> &bCurrentSelections = m_bSelections.find(GetCurrentRow())->second;
|
}
|
||||||
m_Row[m_iCurrentRow].SetUnderlines( bCurrentSelections, GetCurrentHandler() );
|
|
||||||
m_Row[m_iCurrentRow].SetTextFromHandler( GetCurrentHandler() );
|
void OptionsList::UpdateMenuFromSelections()
|
||||||
}
|
{
|
||||||
|
const vector<bool> &bCurrentSelections = m_bSelections.find(GetCurrentRow())->second;
|
||||||
|
m_Row[m_iCurrentRow].SetUnderlines( bCurrentSelections, GetCurrentHandler() );
|
||||||
|
m_Row[m_iCurrentRow].SetTextFromHandler( GetCurrentHandler() );
|
||||||
}
|
}
|
||||||
|
|
||||||
bool OptionsList::Start()
|
bool OptionsList::Start()
|
||||||
|
|||||||
@@ -45,6 +45,8 @@ public:
|
|||||||
|
|
||||||
void Load( RString sType, PlayerNumber pn );
|
void Load( RString sType, PlayerNumber pn );
|
||||||
|
|
||||||
|
void Link( OptionsList *pLink ) { m_pLinked = pLink; }
|
||||||
|
|
||||||
/* Show the top-level menu. */
|
/* Show the top-level menu. */
|
||||||
void Open();
|
void Open();
|
||||||
|
|
||||||
@@ -61,6 +63,7 @@ private:
|
|||||||
void MoveItem( const RString &sRowName, int iMove );
|
void MoveItem( const RString &sRowName, int iMove );
|
||||||
void SwitchMenu( int iDir );
|
void SwitchMenu( int iDir );
|
||||||
void PositionCursor();
|
void PositionCursor();
|
||||||
|
void UpdateMenuFromSelections();
|
||||||
RString GetCurrentRow() const;
|
RString GetCurrentRow() const;
|
||||||
const OptionRowHandler *GetCurrentHandler();
|
const OptionRowHandler *GetCurrentHandler();
|
||||||
int GetOneSelection( RString sRow, bool bAllowFail=false ) const;
|
int GetOneSelection( RString sRow, bool bAllowFail=false ) const;
|
||||||
@@ -75,6 +78,8 @@ private:
|
|||||||
|
|
||||||
InputQueueCodeSet m_Codes;
|
InputQueueCodeSet m_Codes;
|
||||||
|
|
||||||
|
OptionsList *m_pLinked;
|
||||||
|
|
||||||
bool m_bStartIsDown;
|
bool m_bStartIsDown;
|
||||||
bool m_bAcceptStartRelease;
|
bool m_bAcceptStartRelease;
|
||||||
|
|
||||||
|
|||||||
@@ -140,6 +140,8 @@ void ScreenSelectMusic::Init()
|
|||||||
ActorUtil::LoadAllCommands( m_OptionsList[p], m_sName );
|
ActorUtil::LoadAllCommands( m_OptionsList[p], m_sName );
|
||||||
this->AddChild( &m_OptionsList[p] );
|
this->AddChild( &m_OptionsList[p] );
|
||||||
}
|
}
|
||||||
|
m_OptionsList[PLAYER_1].Link( &m_OptionsList[PLAYER_2] );
|
||||||
|
m_OptionsList[PLAYER_2].Link( &m_OptionsList[PLAYER_1] );
|
||||||
}
|
}
|
||||||
|
|
||||||
// this is loaded SetSong and TweenToSong
|
// this is loaded SetSong and TweenToSong
|
||||||
|
|||||||
Reference in New Issue
Block a user