add LifeDifficulty text to ScreenTitleMenu
This commit is contained in:
@@ -71,6 +71,7 @@ VersionOnCommand=horizalign,right;x,620;y,20;diffuse,0.6,0.6,0.6,1;zoom,0.5;shad
|
||||
SongsOnCommand=horizalign,left;x,20;y,20;diffuse,0.6,0.6,0.6,1;zoom,0.5;shadowlength,2
|
||||
MaxStagesOnCommand=hidden,1
|
||||
MaxStagesText=
|
||||
LifeDifficultyOnCommand=hidden,1
|
||||
ChoicesX=320
|
||||
ChoicesStartY=86
|
||||
ChoicesSpacingY=48
|
||||
|
||||
@@ -292,7 +292,7 @@ static void JudgeDifficulty( int &sel, bool ToSel, const CStringArray &choices )
|
||||
MoveMap( sel, PREFSMAN->m_fJudgeWindowScale, ToSel, mapping, ARRAYSIZE(mapping) );
|
||||
}
|
||||
|
||||
static void LifeDifficulty( int &sel, bool ToSel, const CStringArray &choices )
|
||||
void LifeDifficulty( int &sel, bool ToSel, const CStringArray &choices )
|
||||
{
|
||||
const float mapping[] = { 1.60f,1.40f,1.20f,1.00f,0.80f,0.60f,0.40f };
|
||||
MoveMap( sel, PREFSMAN->m_fLifeDifficultyScale, ToSel, mapping, ARRAYSIZE(mapping) );
|
||||
|
||||
@@ -52,6 +52,11 @@ private:
|
||||
void (*MakeOptionsListCB)( CStringArray &out );
|
||||
};
|
||||
|
||||
|
||||
// HACK: This is used by ScreenTitleMenu
|
||||
void LifeDifficulty( int &sel, bool ToSel, const CStringArray &choices );
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "CodeDetector.h"
|
||||
#include "CommonMetrics.h"
|
||||
#include "Game.h"
|
||||
#include "ScreenOptionsMasterPrefs.h"
|
||||
|
||||
|
||||
#define LOGO_ON_COMMAND THEME->GetMetric("ScreenTitleMenu","LogoOnCommand")
|
||||
@@ -30,6 +31,7 @@
|
||||
#define SONGS_ON_COMMAND THEME->GetMetric("ScreenTitleMenu","SongsOnCommand")
|
||||
#define MAX_STAGES_ON_COMMAND THEME->GetMetric("ScreenTitleMenu","MaxStagesOnCommand")
|
||||
#define MAX_STAGES_TEXT THEME->GetMetric("ScreenTitleMenu","MaxStagesText")
|
||||
#define LIFE_DIFFICULTY_ON_COMMAND THEME->GetMetric("ScreenTitleMenu","LifeDifficultyOnCommand")
|
||||
#define HELP_X THEME->GetMetricF("ScreenTitleMenu","HelpX")
|
||||
#define HELP_Y THEME->GetMetricF("ScreenTitleMenu","HelpY")
|
||||
#define CHOICES_X THEME->GetMetricF("ScreenTitleMenu","ChoicesX")
|
||||
@@ -116,6 +118,15 @@ ScreenTitleMenu::ScreenTitleMenu( CString sClassName ) : ScreenSelect( sClassNam
|
||||
m_textMaxStages.SetText( sText );
|
||||
this->AddChild( &m_textMaxStages );
|
||||
|
||||
m_textLifeDifficulty.LoadFromFont( THEME->GetPathF(m_sName,"LifeDifficulty") );
|
||||
m_textLifeDifficulty.Command( LIFE_DIFFICULTY_ON_COMMAND );
|
||||
int iLifeDifficulty;
|
||||
const CStringArray dummy;
|
||||
LifeDifficulty( iLifeDifficulty, true, dummy );
|
||||
iLifeDifficulty++; // LifeDifficulty returns an index
|
||||
m_textLifeDifficulty.SetText( ssprintf( "life difficulty %d", iLifeDifficulty ) );
|
||||
this->AddChild( &m_textLifeDifficulty );
|
||||
|
||||
CString sCoinMode = CoinModeToString((CoinMode)PREFSMAN->GetCoinMode());
|
||||
m_CoinMode.LoadFromAniDir( THEME->GetPathToB("ScreenTitleMenu "+sCoinMode) );
|
||||
this->AddChild( &m_CoinMode );
|
||||
|
||||
@@ -37,6 +37,7 @@ private:
|
||||
BitmapText m_textVersion;
|
||||
BitmapText m_textSongs;
|
||||
BitmapText m_textMaxStages;
|
||||
BitmapText m_textLifeDifficulty;
|
||||
BitmapText m_textHelp;
|
||||
BitmapText m_textChoice[MAX_MODE_CHOICES];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user