add BPM to player options screen
This commit is contained in:
@@ -2820,6 +2820,7 @@ ColorSelected=1,1,1,1 // normal
|
|||||||
ColorNotSelected=0.5,0.5,0.5,1 // grayed
|
ColorNotSelected=0.5,0.5,0.5,1 // grayed
|
||||||
NumShownItems=10
|
NumShownItems=10
|
||||||
ShowScrollBar=0
|
ShowScrollBar=0
|
||||||
|
ShowBpmInSpeedTitle=0
|
||||||
|
|
||||||
[ScreenMapControllers]
|
[ScreenMapControllers]
|
||||||
EvenLineIn=addx,-640;decelerate,0.5;addx,640;
|
EvenLineIn=addx,-640;decelerate,0.5;addx,640;
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
#include "InputMapper.h"
|
#include "InputMapper.h"
|
||||||
#include "ActorUtil.h"
|
#include "ActorUtil.h"
|
||||||
#include "ProfileManager.h"
|
#include "ProfileManager.h"
|
||||||
|
#include "song.h"
|
||||||
|
|
||||||
const float ITEM_X[NUM_PLAYERS] = { 260, 420 };
|
const float ITEM_X[NUM_PLAYERS] = { 260, 420 };
|
||||||
|
|
||||||
@@ -50,6 +51,7 @@ const float ITEM_X[NUM_PLAYERS] = { 260, 420 };
|
|||||||
#define COLOR_SELECTED THEME->GetMetricC("ScreenOptions","ColorSelected")
|
#define COLOR_SELECTED THEME->GetMetricC("ScreenOptions","ColorSelected")
|
||||||
#define COLOR_NOT_SELECTED THEME->GetMetricC("ScreenOptions","ColorNotSelected")
|
#define COLOR_NOT_SELECTED THEME->GetMetricC("ScreenOptions","ColorNotSelected")
|
||||||
#define NUM_SHOWN_ITEMS THEME->GetMetricI("ScreenOptions","NumShownItems")
|
#define NUM_SHOWN_ITEMS THEME->GetMetricI("ScreenOptions","NumShownItems")
|
||||||
|
#define SHOW_BPM_IN_SPEED_TITLE THEME->GetMetricB("ScreenOptions","ShowBpmInSpeedTitle")
|
||||||
|
|
||||||
ScreenOptions::ScreenOptions( CString sClassName ) : Screen(sClassName)
|
ScreenOptions::ScreenOptions( CString sClassName ) : Screen(sClassName)
|
||||||
{
|
{
|
||||||
@@ -341,7 +343,23 @@ CString ScreenOptions::GetExplanationTitle( int row ) const
|
|||||||
sLineName.Replace("\n-","");
|
sLineName.Replace("\n-","");
|
||||||
sLineName.Replace("\n","");
|
sLineName.Replace("\n","");
|
||||||
sLineName.Replace(" ","");
|
sLineName.Replace(" ","");
|
||||||
return THEME->GetMetric( "OptionExplanations", sLineName+"Title" );
|
CString sTitle = THEME->GetMetric( "OptionExplanations", sLineName+"Title" );
|
||||||
|
|
||||||
|
// HACK: tack the BPM onto the name of the speed line
|
||||||
|
if( sLineName.CompareNoCase("speed")==0 )
|
||||||
|
{
|
||||||
|
if( SHOW_BPM_IN_SPEED_TITLE && GAMESTATE->m_pCurSong )
|
||||||
|
{
|
||||||
|
float fMinBpm, fMaxBpm;
|
||||||
|
GAMESTATE->m_pCurSong->GetDisplayBPM( fMinBpm, fMaxBpm );
|
||||||
|
if( fMinBpm == fMaxBpm )
|
||||||
|
sTitle += ssprintf( " (%.0f)", fMinBpm );
|
||||||
|
else
|
||||||
|
sTitle += ssprintf( " (%.0f-%.0f)", fMinBpm, fMaxBpm );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return sTitle;
|
||||||
}
|
}
|
||||||
|
|
||||||
BitmapText &ScreenOptions::GetTextItemForRow( PlayerNumber pn, int iRow )
|
BitmapText &ScreenOptions::GetTextItemForRow( PlayerNumber pn, int iRow )
|
||||||
|
|||||||
Reference in New Issue
Block a user