Add ScreenReloadSongs

This commit is contained in:
Glenn Maynard
2003-09-28 02:57:09 +00:00
parent 52261e7d72
commit b7add9b47c
3 changed files with 46 additions and 0 deletions
+2
View File
@@ -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() );
}
+29
View File
@@ -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" );
}
+15
View File
@@ -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