From 02ddeb2c564628dac2fe1cd6e4d249f5dfeeeddc Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Fri, 15 Feb 2008 09:43:42 +0000 Subject: [PATCH] load one element and call commands on it because there are too many sorts to have graphics for each --- stepmania/src/MusicSortDisplay.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/stepmania/src/MusicSortDisplay.cpp b/stepmania/src/MusicSortDisplay.cpp index 791e6e7c45..7e4b4f259c 100644 --- a/stepmania/src/MusicSortDisplay.cpp +++ b/stepmania/src/MusicSortDisplay.cpp @@ -11,20 +11,26 @@ MusicSortDisplay::MusicSortDisplay() { this->SubscribeToMessage( Message_SortOrderChanged ); + m_spr.Load( THEME->GetPathG("MusicSortDisplay",SortOrderToString(so)) + Set( GAMESTATE->m_SortOrder ); } void MusicSortDisplay::Set( SortOrder so ) { + Message msg("Set"); + msg.SetParam( "SortOrder", pn ); + m_spr->PlayCommand( msg ); + if( so == SortOrder_Invalid ) this->UnloadTexture(); else - Load( THEME->GetPathG("MusicSortDisplay",SortOrderToString(so)) ); + Load( ); } void MusicSortDisplay::HandleMessage( const Message &msg ) { - if( msg == "SortOrderChanged" ) + if( msg.GetName() == "SortOrderChanged" ) Set( GAMESTATE->m_SortOrder ); Sprite::HandleMessage( msg );