auto-update MusicSortDisplay

This commit is contained in:
Glenn Maynard
2005-08-24 21:24:29 +00:00
parent 8ebdf38c71
commit 1e033bfff5
3 changed files with 19 additions and 10 deletions
+16 -2
View File
@@ -2,15 +2,29 @@
#include "MusicSortDisplay.h"
#include "ThemeManager.h"
#include "RageUtil.h"
#include "GameState.h"
MusicSortDisplay::MusicSortDisplay()
{
this->SubscribeToMessage( Message_SortOrderChanged );
Set( GAMESTATE->m_SortOrder );
}
void MusicSortDisplay::Set( SortOrder so )
{
Load( THEME->GetPathG("MusicSortDisplay",SortOrderToString(so)) );
if( so == SORT_INVALID )
this->UnloadTexture();
else
Load( THEME->GetPathG("MusicSortDisplay",SortOrderToString(so)) );
}
void MusicSortDisplay::HandleMessage( const CString& sMessage )
{
if( sMessage == "SortOrderChanged" )
Set( GAMESTATE->m_SortOrder );
Sprite::HandleMessage( sMessage );
}
/*