From 9a21f5a1e1e70185d0f1e94bc8841e487d03ea2c Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 19 Oct 2003 19:59:11 +0000 Subject: [PATCH] defer MusicList loading --- stepmania/src/MusicList.cpp | 3 +++ stepmania/src/MusicList.h | 4 +++- stepmania/src/ScreenSelectGroup.cpp | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/stepmania/src/MusicList.cpp b/stepmania/src/MusicList.cpp index 4e2aaef12b..fec078b575 100644 --- a/stepmania/src/MusicList.cpp +++ b/stepmania/src/MusicList.cpp @@ -16,7 +16,10 @@ MusicList::MusicList() { CurGroup = 0; +} +void MusicList::Load() +{ for( int i=0; iGetPathToF("MusicList titles") ); diff --git a/stepmania/src/MusicList.h b/stepmania/src/MusicList.h index ebd7b07268..2e6832a38f 100644 --- a/stepmania/src/MusicList.h +++ b/stepmania/src/MusicList.h @@ -7,7 +7,8 @@ const int MAX_MLIST_COLUMNS = 5; -class MusicList : public ActorFrame { +class MusicList : public ActorFrame +{ BitmapText m_textTitles[MAX_MLIST_COLUMNS]; struct group { @@ -21,6 +22,7 @@ class MusicList : public ActorFrame { public: MusicList(); + void Load(); /* Add a new group. */ void AddGroup(); diff --git a/stepmania/src/ScreenSelectGroup.cpp b/stepmania/src/ScreenSelectGroup.cpp index 2cf23c8f36..a1fdf46130 100644 --- a/stepmania/src/ScreenSelectGroup.cpp +++ b/stepmania/src/ScreenSelectGroup.cpp @@ -99,6 +99,7 @@ ScreenSelectGroup::ScreenSelectGroup( CString sClassName ) : Screen( sClassName asGroupNames.push_back( iter->first ); // Add songs to the MusicList. + m_MusicList.Load(); for( unsigned g=0; g < asGroupNames.size(); g++ ) /* for each group */ { vector aSongsInGroup;