GradesShowMachine metric

This commit is contained in:
Glenn Maynard
2007-05-03 23:26:22 +00:00
parent b34f8a94e9
commit ca877a00c5
3 changed files with 16 additions and 6 deletions
+1
View File
@@ -1711,6 +1711,7 @@ GradeP1X=90
GradeP1Y=0 GradeP1Y=0
GradeP2X=110 GradeP2X=110
GradeP2Y=0 GradeP2Y=0
GradesShowMachine=true
[WheelNotifyIcon] [WheelNotifyIcon]
ShowTraining=true ShowTraining=true
+12 -6
View File
@@ -26,6 +26,8 @@ WheelItemData::WheelItemData( WheelItemType wit, Song* pSong, RString sSectionNa
MusicWheelItem::MusicWheelItem( RString sType ): MusicWheelItem::MusicWheelItem( RString sType ):
WheelItemBase( sType ) WheelItemBase( sType )
{ {
GRADES_SHOW_MACHINE.Load( sType, "GradesShowMachine" );
data = NULL; data = NULL;
m_sprSongBar.Load( THEME->GetPathG(sType,"song") ); m_sprSongBar.Load( THEME->GetPathG(sType,"song") );
@@ -100,6 +102,7 @@ MusicWheelItem::MusicWheelItem( RString sType ):
MusicWheelItem::MusicWheelItem( const MusicWheelItem &cpy ): MusicWheelItem::MusicWheelItem( const MusicWheelItem &cpy ):
WheelItemBase( cpy ), WheelItemBase( cpy ),
GRADES_SHOW_MACHINE( cpy.GRADES_SHOW_MACHINE ),
m_sprSongBar( cpy.m_sprSongBar ), m_sprSongBar( cpy.m_sprSongBar ),
m_sprSectionBar( cpy.m_sprSectionBar ), m_sprSectionBar( cpy.m_sprSectionBar ),
m_sprExpandedBar( cpy.m_sprExpandedBar ), m_sprExpandedBar( cpy.m_sprExpandedBar ),
@@ -286,12 +289,10 @@ void MusicWheelItem::RefreshGrades()
return; // LoadFromWheelItemData() hasn't been called yet. return; // LoadFromWheelItemData() hasn't been called yet.
FOREACH_HumanPlayer( p ) FOREACH_HumanPlayer( p )
{ {
if( data->m_pSong == NULL ) m_pGradeDisplay[p]->SetVisible( false );
{
m_pGradeDisplay[p]->SetVisible( false ); if( data->m_pSong == NULL && data->m_pCourse == NULL )
continue; continue;
}
m_pGradeDisplay[p]->SetVisible( true );
Difficulty dc; Difficulty dc;
if( GAMESTATE->m_pCurSteps[p] ) if( GAMESTATE->m_pCurSteps[p] )
@@ -301,10 +302,15 @@ void MusicWheelItem::RefreshGrades()
else else
dc = GAMESTATE->m_PreferredDifficulty[p]; dc = GAMESTATE->m_PreferredDifficulty[p];
ProfileSlot ps = ProfileSlot_Machine; ProfileSlot ps;
if( PROFILEMAN->IsPersistentProfile(p) ) if( PROFILEMAN->IsPersistentProfile(p) )
ps = (ProfileSlot)p; ps = (ProfileSlot)p;
else if( GRADES_SHOW_MACHINE )
ps = ProfileSlot_Machine;
else
continue;
m_pGradeDisplay[p]->SetVisible( true );
Grade g = PROFILEMAN->GetGradeForSteps( data->m_pSong, GAMESTATE->GetCurrentStyle(), ps, dc ); Grade g = PROFILEMAN->GetGradeForSteps( data->m_pSong, GAMESTATE->GetCurrentStyle(), ps, dc );
Message msg("SetGrade"); Message msg("SetGrade");
msg.SetParam( "PlayerNumber", p ); msg.SetParam( "PlayerNumber", p );
+3
View File
@@ -11,6 +11,7 @@
#include "GameCommand.h" #include "GameCommand.h"
#include "WheelItemBase.h" #include "WheelItemBase.h"
#include "AutoActor.h" #include "AutoActor.h"
#include "ThemeMetric.h"
class Course; class Course;
class Song; class Song;
@@ -32,6 +33,8 @@ public:
const WheelItemData *data; const WheelItemData *data;
private: private:
ThemeMetric<bool> GRADES_SHOW_MACHINE;
AutoActor m_sprSongBar; AutoActor m_sprSongBar;
AutoActor m_sprSectionBar; AutoActor m_sprSectionBar;
AutoActor m_sprExpandedBar; AutoActor m_sprExpandedBar;