fixed song display on "display group" screen for unlocks
This commit is contained in:
@@ -24,6 +24,8 @@
|
|||||||
#include "ThemeManager.h"
|
#include "ThemeManager.h"
|
||||||
#include <map>
|
#include <map>
|
||||||
#include "ActorUtil.h"
|
#include "ActorUtil.h"
|
||||||
|
#include "GameState.h"
|
||||||
|
#include "UnlockSystem.h"
|
||||||
|
|
||||||
#define BANNER_WIDTH THEME->GetMetricF("ScreenSelectGroup","BannerWidth")
|
#define BANNER_WIDTH THEME->GetMetricF("ScreenSelectGroup","BannerWidth")
|
||||||
#define BANNER_HEIGHT THEME->GetMetricF("ScreenSelectGroup","BannerHeight")
|
#define BANNER_HEIGHT THEME->GetMetricF("ScreenSelectGroup","BannerHeight")
|
||||||
@@ -64,8 +66,19 @@ ScreenSelectGroup::ScreenSelectGroup() : Screen("ScreenSelectGroup")
|
|||||||
// Filter out Songs that can't be played by the current Style
|
// Filter out Songs that can't be played by the current Style
|
||||||
for( j=aAllSongs.size()-1; j>=0; j-- ) // foreach Song, back to front
|
for( j=aAllSongs.size()-1; j>=0; j-- ) // foreach Song, back to front
|
||||||
{
|
{
|
||||||
|
bool DisplaySong = aAllSongs[j]->NormallyDisplayed();
|
||||||
|
|
||||||
|
// check if song is locked
|
||||||
|
if (PREFSMAN->m_bUseUnlockSystem)
|
||||||
|
{
|
||||||
|
SongEntry* m_UnlockSong = GAMESTATE->m_pUnlockingSys->FindSong( aAllSongs[j] );
|
||||||
|
|
||||||
|
if (m_UnlockSong)
|
||||||
|
DisplaySong = (m_UnlockSong->SelectableWheel());
|
||||||
|
}
|
||||||
|
|
||||||
if( aAllSongs[j]->SongCompleteForStyle(GAMESTATE->GetCurrentStyleDef()) &&
|
if( aAllSongs[j]->SongCompleteForStyle(GAMESTATE->GetCurrentStyleDef()) &&
|
||||||
aAllSongs[j]->NormallyDisplayed() )
|
DisplaySong )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
aAllSongs.erase( aAllSongs.begin()+j, aAllSongs.begin()+j+1 );
|
aAllSongs.erase( aAllSongs.begin()+j, aAllSongs.begin()+j+1 );
|
||||||
|
|||||||
@@ -107,6 +107,8 @@ public:
|
|||||||
|
|
||||||
SongEntry *FindLockEntry( CString lockname );
|
SongEntry *FindLockEntry( CString lockname );
|
||||||
|
|
||||||
|
// so class can access FindSong
|
||||||
|
friend class ScreenSelectGroup;
|
||||||
private:
|
private:
|
||||||
SongEntry *FindSong( const Song *pSong );
|
SongEntry *FindSong( const Song *pSong );
|
||||||
SongEntry *FindCourse( const Course *pCourse );
|
SongEntry *FindCourse( const Course *pCourse );
|
||||||
|
|||||||
Reference in New Issue
Block a user