theme RadarCategory and PlayMode in profile.html
This commit is contained in:
@@ -4308,3 +4308,21 @@ TimerSeconds=0
|
|||||||
[Banner]
|
[Banner]
|
||||||
ScrollRandom=1
|
ScrollRandom=1
|
||||||
ScrollRoulette=1
|
ScrollRoulette=1
|
||||||
|
|
||||||
|
[ProfileHtml]
|
||||||
|
ShowPlayModeArcade=1
|
||||||
|
ShowPlayModeNonstop=1
|
||||||
|
ShowPlayModeOni=1
|
||||||
|
ShowPlayModeEndless=1
|
||||||
|
ShowPlayModeBattle=1
|
||||||
|
ShowPlayModeRave=1
|
||||||
|
ShowRadarRadarCategoryStream=1
|
||||||
|
ShowRadarRadarCategoryVoltage=1
|
||||||
|
ShowRadarRadarCategoryAir=1
|
||||||
|
ShowRadarRadarCategoryFreeze=1
|
||||||
|
ShowRadarRadarCategoryChaos=1
|
||||||
|
ShowRadarRadarCategoryTaps=1
|
||||||
|
ShowRadarRadarCategoryJumps=1
|
||||||
|
ShowRadarRadarCategoryHolds=1
|
||||||
|
ShowRadarRadarCategoryMines=1
|
||||||
|
ShowRadarRadarCategoryHands=1
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ static const CString RadarCategoryNames[NUM_RADAR_CATEGORIES] = {
|
|||||||
"Hands",
|
"Hands",
|
||||||
};
|
};
|
||||||
XToString( RadarCategory );
|
XToString( RadarCategory );
|
||||||
|
XToThemedString( RadarCategory );
|
||||||
|
|
||||||
|
|
||||||
static const CString DifficultyNames[NUM_RADAR_CATEGORIES] = {
|
static const CString DifficultyNames[NUM_RADAR_CATEGORIES] = {
|
||||||
@@ -89,6 +90,7 @@ static const CString PlayModeNames[NUM_PLAY_MODES] = {
|
|||||||
"Rave",
|
"Rave",
|
||||||
};
|
};
|
||||||
XToString( PlayMode );
|
XToString( PlayMode );
|
||||||
|
XToThemedString( PlayMode );
|
||||||
StringToX( PlayMode );
|
StringToX( PlayMode );
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ enum RadarCategory
|
|||||||
};
|
};
|
||||||
#define FOREACH_RadarCategory( rc ) FOREACH_ENUM( RadarCategory, NUM_RADAR_CATEGORIES, rc )
|
#define FOREACH_RadarCategory( rc ) FOREACH_ENUM( RadarCategory, NUM_RADAR_CATEGORIES, rc )
|
||||||
const CString& RadarCategoryToString( RadarCategory cat );
|
const CString& RadarCategoryToString( RadarCategory cat );
|
||||||
|
CString RadarCategoryToThemedString( RadarCategory cat );
|
||||||
|
|
||||||
struct RadarValues
|
struct RadarValues
|
||||||
{
|
{
|
||||||
@@ -164,6 +165,7 @@ enum PlayMode
|
|||||||
};
|
};
|
||||||
#define FOREACH_PlayMode( pm ) FOREACH_ENUM( PlayMode, NUM_PLAY_MODES, pm )
|
#define FOREACH_PlayMode( pm ) FOREACH_ENUM( PlayMode, NUM_PLAY_MODES, pm )
|
||||||
const CString& PlayModeToString( PlayMode pm );
|
const CString& PlayModeToString( PlayMode pm );
|
||||||
|
CString PlayModeToThemedString( PlayMode pm );
|
||||||
PlayMode StringToPlayMode( const CString& s );
|
PlayMode StringToPlayMode( const CString& s );
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -33,9 +33,11 @@
|
|||||||
const CString STATS_HTML = "Stats.html";
|
const CString STATS_HTML = "Stats.html";
|
||||||
const CString STYLE_CSS = "Style.css";
|
const CString STYLE_CSS = "Style.css";
|
||||||
|
|
||||||
#define TITLE THEME->GetMetric("ProfileHtml","Title")
|
#define TITLE THEME->GetMetric("ProfileHtml","Title")
|
||||||
#define FOOTER THEME->GetMetric("ProfileHtml","Footer")
|
#define FOOTER THEME->GetMetric("ProfileHtml","Footer")
|
||||||
#define VERIFICATION_TEXT THEME->GetMetric("ProfileHtml","VerificationText")
|
#define VERIFICATION_TEXT THEME->GetMetric("ProfileHtml","VerificationText")
|
||||||
|
#define SHOW_PLAY_MODE(pm) THEME->GetMetric("ProfileHtml","ShowPlayMode"+PlayModeToString(pm))
|
||||||
|
#define SHOW_RADAR_CATEGORY(rc) THEME->GetMetric("ProfileHtml","ShowCategory"+RadarCategoryToString(rc))
|
||||||
|
|
||||||
|
|
||||||
static int g_Level = 1;
|
static int g_Level = 1;
|
||||||
@@ -298,7 +300,11 @@ void PrintStatistics( RageFile &f, const Profile *pProfile, CString sTitle, vect
|
|||||||
{
|
{
|
||||||
BEGIN_TABLE(4);
|
BEGIN_TABLE(4);
|
||||||
FOREACH_PlayMode( pm )
|
FOREACH_PlayMode( pm )
|
||||||
TABLE_LINE2( PlayModeToString(pm), pProfile->m_iNumSongsPlayedByPlayMode[pm] );
|
{
|
||||||
|
if( !SHOW_PLAY_MODE(pm) )
|
||||||
|
continue; // skip
|
||||||
|
TABLE_LINE2( PlayModeToThemedString(pm), pProfile->m_iNumSongsPlayedByPlayMode[pm] );
|
||||||
|
}
|
||||||
END_TABLE;
|
END_TABLE;
|
||||||
}
|
}
|
||||||
PRINT_CLOSE(f);
|
PRINT_CLOSE(f);
|
||||||
@@ -328,7 +334,7 @@ void PrintStatistics( RageFile &f, const Profile *pProfile, CString sTitle, vect
|
|||||||
{
|
{
|
||||||
BEGIN_TABLE(4);
|
BEGIN_TABLE(4);
|
||||||
FOREACH_Difficulty( dc )
|
FOREACH_Difficulty( dc )
|
||||||
TABLE_LINE2( DifficultyToString(dc), pProfile->m_iNumSongsPlayedByDifficulty[dc] );
|
TABLE_LINE2( DifficultyToThemedString(dc), pProfile->m_iNumSongsPlayedByDifficulty[dc] );
|
||||||
END_TABLE;
|
END_TABLE;
|
||||||
}
|
}
|
||||||
PRINT_CLOSE(f);
|
PRINT_CLOSE(f);
|
||||||
@@ -457,9 +463,9 @@ void PrintPopularity( RageFile &f, const Profile *pProfile, CString sTitle, vect
|
|||||||
if( iNumTimesPlayed==0 )
|
if( iNumTimesPlayed==0 )
|
||||||
continue; // skip
|
continue; // skip
|
||||||
CString s;
|
CString s;
|
||||||
s += GAMEMAN->NotesTypeToString(pSteps->m_StepsType);
|
s += GAMEMAN->NotesTypeToThemedString(pSteps->m_StepsType);
|
||||||
s += " ";
|
s += " ";
|
||||||
s += DifficultyToString(pSteps->GetDifficulty());
|
s += DifficultyToThemedString(pSteps->GetDifficulty());
|
||||||
TABLE_LINE5(i+1, pSong->GetDisplayMainTitle(), pSong->GetDisplaySubTitle(), s, PrettyPercent(iNumTimesPlayed,iTotalPlays) );
|
TABLE_LINE5(i+1, pSong->GetDisplayMainTitle(), pSong->GetDisplaySubTitle(), s, PrettyPercent(iNumTimesPlayed,iTotalPlays) );
|
||||||
}
|
}
|
||||||
if( i == 0 )
|
if( i == 0 )
|
||||||
@@ -614,7 +620,7 @@ void PrintHighScoreListTable( RageFile &f, const HighScoreList& hsl )
|
|||||||
const HighScore &hs = hsl.vHighScores[i];
|
const HighScore &hs = hsl.vHighScores[i];
|
||||||
CString sName = ssprintf("#%d",i+1);
|
CString sName = ssprintf("#%d",i+1);
|
||||||
CString sHSName = hs.sName.empty() ? "????" : hs.sName;
|
CString sHSName = hs.sName.empty() ? "????" : hs.sName;
|
||||||
CString sValue = ssprintf("%s, %s, %i, %.2f%%", sHSName.c_str(), GradeToString(hs.grade).c_str(), hs.iScore, hs.fPercentDP*100);
|
CString sValue = ssprintf("%s, %s, %i, %.2f%%", sHSName.c_str(), GradeToThemedString(hs.grade).c_str(), hs.iScore, hs.fPercentDP*100);
|
||||||
TABLE_LINE2( sName.c_str(), sValue );
|
TABLE_LINE2( sName.c_str(), sValue );
|
||||||
}
|
}
|
||||||
END_TABLE;
|
END_TABLE;
|
||||||
@@ -648,9 +654,9 @@ bool PrintHighScoresForSong( RageFile &f, const Profile *pProfile, Song* pSong )
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
CString s =
|
CString s =
|
||||||
GAMEMAN->NotesTypeToString(pSteps->m_StepsType) +
|
GAMEMAN->NotesTypeToThemedString(pSteps->m_StepsType) +
|
||||||
" - " +
|
" - " +
|
||||||
DifficultyToString(pSteps->GetDifficulty());
|
DifficultyToThemedString(pSteps->GetDifficulty());
|
||||||
PRINT_OPEN(f, s, true);
|
PRINT_OPEN(f, s, true);
|
||||||
{
|
{
|
||||||
PrintHighScoreListTable( f, hsl );
|
PrintHighScoreListTable( f, hsl );
|
||||||
@@ -677,7 +683,7 @@ bool PrintHighScoresForCourse( RageFile &f, const Profile *pProfile, Course* pCo
|
|||||||
|
|
||||||
bPrintedAny = true;
|
bPrintedAny = true;
|
||||||
|
|
||||||
PRINT_OPEN(f, GAMEMAN->NotesTypeToString(st)+" - "+CourseDifficultyToString(cd) );
|
PRINT_OPEN(f, GAMEMAN->NotesTypeToThemedString(st)+" - "+CourseDifficultyToThemedString(cd) );
|
||||||
{
|
{
|
||||||
PrintHighScoreListTable( f, hsl );
|
PrintHighScoreListTable( f, hsl );
|
||||||
}
|
}
|
||||||
@@ -708,7 +714,7 @@ bool PrintGradeTableForStepsType( RageFile &f, const Profile *pProfile, StepsTyp
|
|||||||
unsigned i;
|
unsigned i;
|
||||||
const vector<Song*> &vpSongs = SONGMAN->GetAllSongs();
|
const vector<Song*> &vpSongs = SONGMAN->GetAllSongs();
|
||||||
|
|
||||||
PRINT_OPEN(f, GAMEMAN->NotesTypeToString(st).c_str() );
|
PRINT_OPEN(f, GAMEMAN->NotesTypeToThemedString(st).c_str() );
|
||||||
{
|
{
|
||||||
f.PutLine( "<table class='difficulty'>\n" );
|
f.PutLine( "<table class='difficulty'>\n" );
|
||||||
|
|
||||||
@@ -718,7 +724,7 @@ bool PrintGradeTableForStepsType( RageFile &f, const Profile *pProfile, StepsTyp
|
|||||||
{
|
{
|
||||||
if( dc == DIFFICULTY_EDIT )
|
if( dc == DIFFICULTY_EDIT )
|
||||||
continue; // skip
|
continue; // skip
|
||||||
f.PutLine( ssprintf("<td>%s</td>", Capitalize(DifficultyToString(dc)).c_str()) );
|
f.PutLine( ssprintf("<td>%s</td>", Capitalize(DifficultyToThemedString(dc)).c_str()) );
|
||||||
}
|
}
|
||||||
f.PutLine( "</tr>" );
|
f.PutLine( "</tr>" );
|
||||||
|
|
||||||
@@ -802,9 +808,9 @@ bool PrintInventoryForSong( RageFile &f, const Profile *pProfile, Song* pSong )
|
|||||||
if( pSteps->IsAutogen() )
|
if( pSteps->IsAutogen() )
|
||||||
continue; // skip autogen
|
continue; // skip autogen
|
||||||
CString s =
|
CString s =
|
||||||
GAMEMAN->NotesTypeToString(pSteps->m_StepsType) +
|
GAMEMAN->NotesTypeToThemedString(pSteps->m_StepsType) +
|
||||||
" - " +
|
" - " +
|
||||||
DifficultyToString(pSteps->GetDifficulty());
|
DifficultyToThemedString(pSteps->GetDifficulty());
|
||||||
PRINT_OPEN(f, s, true); // use poister value as the hash
|
PRINT_OPEN(f, s, true); // use poister value as the hash
|
||||||
{
|
{
|
||||||
BEGIN_TABLE(3);
|
BEGIN_TABLE(3);
|
||||||
@@ -816,7 +822,10 @@ bool PrintInventoryForSong( RageFile &f, const Profile *pProfile, Song* pSong )
|
|||||||
BEGIN_TABLE(2);
|
BEGIN_TABLE(2);
|
||||||
FOREACH_RadarCategory( cat )
|
FOREACH_RadarCategory( cat )
|
||||||
{
|
{
|
||||||
CString sCat = RadarCategoryToString(cat);
|
if( !SHOW_RADAR_CATEGORY(cat) )
|
||||||
|
continue; // skip
|
||||||
|
|
||||||
|
CString sCat = RadarCategoryToThemedString(cat);
|
||||||
float fVal = pSteps->GetRadarValues()[cat];
|
float fVal = pSteps->GetRadarValues()[cat];
|
||||||
CString sVal = ssprintf( "%.2f", fVal );
|
CString sVal = ssprintf( "%.2f", fVal );
|
||||||
TABLE_LINE2( sCat, sVal );
|
TABLE_LINE2( sCat, sVal );
|
||||||
|
|||||||
Reference in New Issue
Block a user