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