Move the expanded section name into GameState
This commit is contained in:
@@ -164,6 +164,8 @@ GameState::GameState() :
|
||||
|
||||
m_bDopefish = false;
|
||||
|
||||
sExpandedSectionName = "";
|
||||
|
||||
// Don't reset yet; let the first screen do it, so we can use PREFSMAN and THEME.
|
||||
//Reset();
|
||||
|
||||
@@ -347,6 +349,8 @@ void GameState::Reset()
|
||||
|
||||
m_bBackedOutOfFinalStage = false;
|
||||
m_bEarnedExtraStage = false;
|
||||
sExpandedSectionName = "";
|
||||
|
||||
ApplyCmdline();
|
||||
}
|
||||
|
||||
|
||||
@@ -200,6 +200,8 @@ public:
|
||||
* This resets whenever a player joins or continues. */
|
||||
int m_iPlayerStageTokens[NUM_PLAYERS];
|
||||
|
||||
RString sExpandedSectionName;
|
||||
|
||||
static int GetNumStagesMultiplierForSong( const Song* pSong );
|
||||
static int GetNumStagesForSongAndStyleType( const Song* pSong, StyleType st );
|
||||
int GetNumStagesForCurrentSongAndStepsOrCourse() const;
|
||||
|
||||
@@ -1327,6 +1327,7 @@ void MusicWheel::SetOpenSection( RString group )
|
||||
{
|
||||
//LOG->Trace( "SetOpenSection %s", group.c_str() );
|
||||
m_sExpandedSectionName = group;
|
||||
GAMESTATE->sExpandedSectionName = group;
|
||||
|
||||
// wheel positions = num song groups
|
||||
if ( REMIND_WHEEL_POSITIONS && HIDE_INACTIVE_SECTIONS )
|
||||
|
||||
@@ -222,13 +222,8 @@ void MusicWheelItem::LoadFromWheelItemData( const WheelItemBaseData *pData, int
|
||||
case TYPE_SECTION:
|
||||
{
|
||||
sDisplayName = SONGMAN->ShortenGroupName(pWID->m_sText);
|
||||
RString sExpandedSectionName;
|
||||
|
||||
// TODO: Move the expanded section name into GameState?
|
||||
ScreenSelectMusic *pScreen = dynamic_cast<ScreenSelectMusic*>(SCREENMAN->GetTopScreen() );
|
||||
if( pScreen )
|
||||
sExpandedSectionName = pScreen->GetMusicWheel()->GetExpandedSectionName();
|
||||
if( sExpandedSectionName == pWID->m_sText )
|
||||
if( GAMESTATE->sExpandedSectionName == pWID->m_sText )
|
||||
type = MusicWheelItemType_SectionExpanded;
|
||||
else
|
||||
type = MusicWheelItemType_SectionCollapsed;
|
||||
|
||||
Reference in New Issue
Block a user