Add ScreenReloadSongs
This commit is contained in:
@@ -296,6 +296,7 @@ void Screen::ClearMessageQueue( const ScreenMessage SM )
|
||||
#include "ScreenProfileOptions.h"
|
||||
#include "ScreenExit.h"
|
||||
#include "ScreenAttract.h"
|
||||
#include "ScreenReloadSongs.h"
|
||||
|
||||
Screen* Screen::Create( CString sClassName )
|
||||
{
|
||||
@@ -398,6 +399,7 @@ Screen* Screen::Create( CString sClassName )
|
||||
IF_RETURN( ScreenEditCoursesMenu );
|
||||
IF_RETURN( ScreenProfileOptions );
|
||||
IF_RETURN( ScreenExit );
|
||||
IF_RETURN( ScreenReloadSongs );
|
||||
|
||||
RageException::Throw( "Invalid Screen class name '%s'", sClassName.c_str() );
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
#include "global.h"
|
||||
|
||||
#include "ScreenReloadSongs.h"
|
||||
#include "SongManager.h"
|
||||
#include "UnlockSystem.h"
|
||||
#include "ScreenManager.h"
|
||||
|
||||
/* This could be cleaned up: show progress, for example. Let's not use
|
||||
* this for the initial load, since we don't want to start up the display
|
||||
* until we finish loading songs; that way, people can continue to use their
|
||||
* computer while songs load. */
|
||||
ScreenReloadSongs::ScreenReloadSongs( CString sClassName ): Screen(sClassName)
|
||||
{
|
||||
m_FirstUpdate = true;
|
||||
}
|
||||
|
||||
void ScreenReloadSongs::Update( float fDeltaTime )
|
||||
{
|
||||
if( !m_FirstUpdate )
|
||||
return;
|
||||
|
||||
m_FirstUpdate = false;
|
||||
SONGMAN->Reload();
|
||||
UNLOCKSYS->UpdateSongs();
|
||||
SCREENMAN->SetNewScreen( "ScreenTitleMenu" );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
#ifndef SCREEN_RELOAD_SONGS_H
|
||||
#define SCREEN_RELOAD_SONGS_H
|
||||
|
||||
#include "Screen.h"
|
||||
|
||||
class ScreenReloadSongs: public Screen
|
||||
{
|
||||
bool m_FirstUpdate;
|
||||
|
||||
public:
|
||||
ScreenReloadSongs( CString sClassName );
|
||||
void Update( float fDeltaTime );
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user