data-driven pump-style coloring/naming (merge disparate difficulty string/color systems and simplify Lua)
This commit is contained in:
@@ -280,7 +280,8 @@ void CatalogXml::Save( LoadingWindow *loading_window )
|
||||
FOREACH_CONST( Difficulty, vDifficultiesToShow, iter )
|
||||
{
|
||||
XNode* pNode3 = pNode2->AppendChild( "Difficulty", DifficultyToString(*iter) );
|
||||
pNode3->AppendAttr( "DisplayAs", DifficultyToLocalizedString(*iter) );
|
||||
DifficultyDisplayType ddt = MakeDifficultyDisplayType( *iter, StepsTypeCategory_Single ); // TODO: Fix use of Single
|
||||
pNode3->AppendAttr( "DisplayAs", DifficultyDisplayTypeToLocalizedString(ddt) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ RString CourseEntry::GetTextDescription() const
|
||||
if( songCriteria.m_bUseSongGenreAllowedList )
|
||||
vsEntryDescription.push_back( join(",",songCriteria.m_vsSongGenreAllowedList) );
|
||||
if( stepsCriteria.m_difficulty != Difficulty_Invalid && stepsCriteria.m_difficulty != Difficulty_Medium )
|
||||
vsEntryDescription.push_back( DifficultyToLocalizedString(stepsCriteria.m_difficulty) );
|
||||
vsEntryDescription.push_back( CourseDifficultyToLocalizedString(stepsCriteria.m_difficulty) );
|
||||
if( stepsCriteria.m_iLowMeter != -1 )
|
||||
vsEntryDescription.push_back( ssprintf("Low meter: %d", stepsCriteria.m_iLowMeter) );
|
||||
if( stepsCriteria.m_iHighMeter != -1 )
|
||||
|
||||
@@ -15,9 +15,27 @@ static const char *DifficultyNames[] = {
|
||||
"Edit",
|
||||
};
|
||||
XToString( Difficulty );
|
||||
XToLocalizedString( Difficulty );
|
||||
LuaXType( Difficulty );
|
||||
LuaFunction( DifficultyToLocalizedString, DifficultyToLocalizedString( Enum::Check<Difficulty>(L, 1)) );
|
||||
|
||||
static const char *DifficultyDisplayTypeNames[] = {
|
||||
"Single_Beginner",
|
||||
"Single_Easy",
|
||||
"Single_Medium",
|
||||
"Single_Hard",
|
||||
"Single_Challenge",
|
||||
"Double_Beginner",
|
||||
"Double_Easy",
|
||||
"Double_Medium",
|
||||
"Double_Hard",
|
||||
"Double_Challenge",
|
||||
"Edit",
|
||||
"Couple",
|
||||
"Routine",
|
||||
};
|
||||
XToString( DifficultyDisplayType );
|
||||
XToLocalizedString( DifficultyDisplayType );
|
||||
LuaXType( DifficultyDisplayType );
|
||||
LuaFunction( DifficultyDisplayTypeToLocalizedString, DifficultyDisplayTypeToLocalizedString( Enum::Check<DifficultyDisplayType>(L, 1)) );
|
||||
|
||||
/* We prefer the above names; recognize a number of others, too. (They'll
|
||||
* get normalized when written to SMs, etc.) */
|
||||
@@ -76,6 +94,26 @@ CourseDifficulty GetNextShownCourseDifficulty( CourseDifficulty cd )
|
||||
return Difficulty_Invalid;
|
||||
}
|
||||
|
||||
DifficultyDisplayType MakeDifficultyDisplayType( Difficulty dc, StepsTypeCategory stc )
|
||||
{
|
||||
switch( stc )
|
||||
{
|
||||
DEFAULT_FAIL(stc);
|
||||
case StepsTypeCategory_Single:
|
||||
if( dc == Difficulty_Edit )
|
||||
return DifficultyDisplayType_Edit;
|
||||
return (DifficultyDisplayType)(DifficultyDisplayType_Single_Beginner + dc);
|
||||
case StepsTypeCategory_Double:
|
||||
if( dc == Difficulty_Edit )
|
||||
return DifficultyDisplayType_Edit;
|
||||
return (DifficultyDisplayType)(DifficultyDisplayType_Double_Beginner + dc);
|
||||
case StepsTypeCategory_Couple:
|
||||
return DifficultyDisplayType_Couple;
|
||||
case StepsTypeCategory_Routine:
|
||||
return DifficultyDisplayType_Routine;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (c) 2001-2004 Chris Danford
|
||||
* All rights reserved.
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define DIFFICULTY_H
|
||||
|
||||
#include "EnumHelper.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
|
||||
//
|
||||
// Player number stuff
|
||||
@@ -18,11 +19,9 @@ enum Difficulty
|
||||
Difficulty_Invalid
|
||||
};
|
||||
const RString& DifficultyToString( Difficulty dc );
|
||||
const RString& DifficultyToLocalizedString( Difficulty dc );
|
||||
Difficulty StringToDifficulty( const RString& sDC );
|
||||
LuaDeclareType( Difficulty );
|
||||
|
||||
|
||||
typedef Difficulty CourseDifficulty;
|
||||
const int NUM_CourseDifficulty = NUM_Difficulty;
|
||||
#define FOREACH_ShownCourseDifficulty( cd ) for( Difficulty cd=GetNextShownCourseDifficulty((CourseDifficulty)-1); cd!=Difficulty_Invalid; cd=GetNextShownCourseDifficulty(cd) )
|
||||
@@ -31,6 +30,32 @@ const RString& CourseDifficultyToLocalizedString( Difficulty dc );
|
||||
|
||||
Difficulty GetNextShownCourseDifficulty( Difficulty pn );
|
||||
|
||||
|
||||
enum DifficultyDisplayType // ID for coloring and localized strings in DifficultyDisplay
|
||||
{
|
||||
DifficultyDisplayType_Single_Beginner,
|
||||
DifficultyDisplayType_Single_Easy,
|
||||
DifficultyDisplayType_Single_Medium,
|
||||
DifficultyDisplayType_Single_Hard,
|
||||
DifficultyDisplayType_Single_Challenge,
|
||||
DifficultyDisplayType_Double_Beginner,
|
||||
DifficultyDisplayType_Double_Easy,
|
||||
DifficultyDisplayType_Double_Medium,
|
||||
DifficultyDisplayType_Double_Hard,
|
||||
DifficultyDisplayType_Double_Challenge,
|
||||
DifficultyDisplayType_Edit,
|
||||
DifficultyDisplayType_Couple, // color this specially (don't color by difficulty) because there isn't usually more than one per song
|
||||
DifficultyDisplayType_Routine, // color this specially (don't color by difficulty) because there isn't usually more than one per song
|
||||
NUM_DifficultyDisplayType,
|
||||
DifficultyDisplayType_Invalid
|
||||
};
|
||||
const RString& DifficultyDisplayTypeToString( DifficultyDisplayType dc );
|
||||
const RString& DifficultyDisplayTypeToLocalizedString( DifficultyDisplayType dc );
|
||||
DifficultyDisplayType StringToDifficultyDisplayType( const RString& s );
|
||||
LuaDeclareType( DifficultyDisplayType );
|
||||
|
||||
DifficultyDisplayType MakeDifficultyDisplayType( Difficulty dc, StepsTypeCategory stc );
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
@@ -42,37 +42,41 @@ DifficultyDisplay::DifficultyDisplay()
|
||||
* so I'm trying it first in only this object.
|
||||
*/
|
||||
|
||||
void DifficultyDisplay::Load( const RString &sType )
|
||||
void DifficultyDisplay::Load( const RString &sMetricsGroup )
|
||||
{
|
||||
m_sMetricsGroup = sMetricsGroup;
|
||||
|
||||
/* We can't use global ThemeMetric<RString>s, because we can have multiple
|
||||
* DifficultyDisplays on screen at once, with different names. */
|
||||
m_iNumTicks.Load(sType,"NumTicks");
|
||||
m_iMaxTicks.Load(sType,"MaxTicks");
|
||||
m_bShowTicks.Load(sType,"ShowTicks");
|
||||
m_bShowMeter.Load(sType,"ShowMeter");
|
||||
m_bShowDescription.Load(sType,"ShowDescription");
|
||||
m_sZeroMeterString.Load(sType,"ZeroMeterString");
|
||||
m_iNumTicks.Load(m_sMetricsGroup,"NumTicks");
|
||||
m_iMaxTicks.Load(m_sMetricsGroup,"MaxTicks");
|
||||
m_bShowTicks.Load(m_sMetricsGroup,"ShowTicks");
|
||||
m_bShowMeter.Load(m_sMetricsGroup,"ShowMeter");
|
||||
m_bShowDescription.Load(m_sMetricsGroup,"ShowDescription");
|
||||
m_bShowAutogen.Load(m_sMetricsGroup,"ShowAutogen");
|
||||
m_bShowStepsType.Load(m_sMetricsGroup,"ShowStepsType");
|
||||
m_sZeroMeterString.Load(m_sMetricsGroup,"ZeroMeterString");
|
||||
|
||||
|
||||
m_sprFrame.Load( THEME->GetPathG(sType,"frame") );
|
||||
m_sprFrame.Load( THEME->GetPathG(m_sMetricsGroup,"frame") );
|
||||
m_sprFrame->SetName( "Frame" );
|
||||
ActorUtil::LoadAllCommandsAndSetXYAndOnCommand( m_sprFrame, sType );
|
||||
ActorUtil::LoadAllCommandsAndSetXYAndOnCommand( m_sprFrame, m_sMetricsGroup );
|
||||
this->AddChild( m_sprFrame );
|
||||
|
||||
if( m_bShowTicks )
|
||||
{
|
||||
RString sChars = "10"; // on, off
|
||||
m_textTicks.SetName( "Ticks" );
|
||||
m_textTicks.LoadFromTextureAndChars( THEME->GetPathF(sType,"ticks"), sChars );
|
||||
ActorUtil::LoadAllCommandsAndSetXYAndOnCommand( m_textTicks, sType );
|
||||
m_textTicks.LoadFromTextureAndChars( THEME->GetPathF(m_sMetricsGroup,"ticks"), sChars );
|
||||
ActorUtil::LoadAllCommandsAndSetXYAndOnCommand( m_textTicks, m_sMetricsGroup );
|
||||
this->AddChild( &m_textTicks );
|
||||
}
|
||||
|
||||
if( m_bShowMeter )
|
||||
{
|
||||
m_textMeter.SetName( "Meter" );
|
||||
m_textMeter.LoadFromFont( THEME->GetPathF(sType,"meter") );
|
||||
ActorUtil::LoadAllCommandsAndSetXYAndOnCommand( m_textMeter, sType );
|
||||
m_textMeter.LoadFromFont( THEME->GetPathF(m_sMetricsGroup,"meter") );
|
||||
ActorUtil::LoadAllCommandsAndSetXYAndOnCommand( m_textMeter, m_sMetricsGroup );
|
||||
this->AddChild( &m_textMeter );
|
||||
|
||||
// These commands should have been loaded by SetXYAndOnCommand above.
|
||||
@@ -82,16 +86,25 @@ void DifficultyDisplay::Load( const RString &sType )
|
||||
if( m_bShowDescription )
|
||||
{
|
||||
m_textDescription.SetName( "Description" );
|
||||
m_textDescription.LoadFromFont( THEME->GetPathF(sType,"Description") );
|
||||
ActorUtil::LoadAllCommandsAndSetXYAndOnCommand( m_textDescription, sType );
|
||||
m_textDescription.LoadFromFont( THEME->GetPathF(m_sMetricsGroup,"Description") );
|
||||
ActorUtil::LoadAllCommandsAndSetXYAndOnCommand( m_textDescription, m_sMetricsGroup );
|
||||
this->AddChild( &m_textDescription );
|
||||
}
|
||||
|
||||
m_sprAutogen.Load( THEME->GetPathG(sType,"Autogen") );
|
||||
m_sprAutogen->SetName( "Autogen" );
|
||||
ActorUtil::LoadAllCommandsAndSetXYAndOnCommand( m_sprAutogen, sType );
|
||||
this->AddChild( m_sprAutogen );
|
||||
|
||||
if( m_bShowAutogen )
|
||||
{
|
||||
m_sprAutogen.Load( THEME->GetPathG(m_sMetricsGroup,"Autogen") );
|
||||
m_sprAutogen->SetName( "Autogen" );
|
||||
ActorUtil::LoadAllCommandsAndSetXYAndOnCommand( m_sprAutogen, m_sMetricsGroup );
|
||||
this->AddChild( m_sprAutogen );
|
||||
}
|
||||
|
||||
if( m_bShowStepsType )
|
||||
{
|
||||
m_sprStepsType.SetName( "StepsType" );
|
||||
ActorUtil::LoadAllCommandsAndSetXYAndOnCommand( m_sprStepsType, m_sMetricsGroup );
|
||||
this->AddChild( &m_sprStepsType );
|
||||
}
|
||||
|
||||
Unset();
|
||||
}
|
||||
@@ -170,6 +183,10 @@ void DifficultyDisplay::SetFromStepsTypeAndMeterAndCourseDifficulty( StepsType s
|
||||
|
||||
void DifficultyDisplay::SetInternal( const SetParams ¶ms )
|
||||
{
|
||||
DifficultyDisplayType ddt = DifficultyDisplayType_Invalid;
|
||||
if( params.st != StepsType_Invalid )
|
||||
ddt = MakeDifficultyDisplayType( params.dc, GameManager::GetStepsTypeInfo(params.st).m_StepsTypeCategory );
|
||||
|
||||
Message msg( "Set" );
|
||||
if( params.pSteps )
|
||||
msg.SetParam( "Steps", LuaReference::CreateFromPush(*(Steps*)params.pSteps) );
|
||||
@@ -180,6 +197,7 @@ void DifficultyDisplay::SetInternal( const SetParams ¶ms )
|
||||
msg.SetParam( "Difficulty", params.dc );
|
||||
msg.SetParam( "IsCourseDifficulty", params.bIsCourseDifficulty );
|
||||
msg.SetParam( "Description", params.sDescription );
|
||||
msg.SetParam( "DifficultyDisplayType", ddt );
|
||||
|
||||
m_sprFrame->HandleMessage( msg );
|
||||
|
||||
@@ -211,14 +229,46 @@ void DifficultyDisplay::SetInternal( const SetParams ¶ms )
|
||||
|
||||
if( m_bShowDescription )
|
||||
{
|
||||
if( params.dc == Difficulty_Edit )
|
||||
m_textDescription.SetText( params.sDescription );
|
||||
else if( params.bIsCourseDifficulty )
|
||||
m_textDescription.SetText( CourseDifficultyToLocalizedString(params.dc) );
|
||||
RString s;
|
||||
if( params.bIsCourseDifficulty )
|
||||
{
|
||||
s = CourseDifficultyToLocalizedString(params.dc);
|
||||
}
|
||||
else
|
||||
m_textDescription.SetText( DifficultyToLocalizedString(params.dc) );
|
||||
{
|
||||
switch( ddt )
|
||||
{
|
||||
case DifficultyDisplayType_Invalid:
|
||||
// empty string
|
||||
break;
|
||||
case DifficultyDisplayType_Edit:
|
||||
s = params.sDescription;
|
||||
break;
|
||||
default:
|
||||
s = DifficultyDisplayTypeToLocalizedString( ddt );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
m_textDescription.SetText( s );
|
||||
}
|
||||
|
||||
if( m_bShowAutogen )
|
||||
{
|
||||
bool b = params.pSteps && params.pSteps->IsAutogen();
|
||||
m_sprAutogen->SetVisible( b );
|
||||
}
|
||||
|
||||
if( m_bShowStepsType )
|
||||
{
|
||||
// TODO: Make this an AutoActor, optimize graphic loading
|
||||
if( params.st != StepsType_Invalid )
|
||||
{
|
||||
RString sStepsType = GAMEMAN->GetStepsTypeInfo(params.st).szName;
|
||||
m_sprStepsType.Load( THEME->GetPathG(m_sMetricsGroup,"StepsType "+sStepsType) );
|
||||
}
|
||||
}
|
||||
|
||||
this->HandleMessage( msg );
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "Difficulty.h"
|
||||
#include "ActorFrame.h"
|
||||
#include "ThemeMetric.h"
|
||||
#include "Sprite.h"
|
||||
|
||||
class Steps;
|
||||
class Trail;
|
||||
@@ -20,7 +21,7 @@ class DifficultyDisplay : public ActorFrame
|
||||
public:
|
||||
DifficultyDisplay();
|
||||
|
||||
void Load( const RString &sType );
|
||||
void Load( const RString &sMetricsGroup );
|
||||
void LoadFromNode( const XNode* pNode );
|
||||
|
||||
virtual DifficultyDisplay *Copy() const;
|
||||
@@ -48,18 +49,23 @@ private:
|
||||
};
|
||||
void SetInternal( const SetParams ¶ms );
|
||||
|
||||
RString m_sMetricsGroup;
|
||||
|
||||
AutoActor m_sprFrame;
|
||||
BitmapText m_textTicks; /* 111100000 */
|
||||
BitmapText m_textMeter; /* 3, 9 */
|
||||
BitmapText m_textDescription; /* Easy, Medium, SuperCoolEdit */
|
||||
AutoActor m_sprAutogen; // visible if Steps and is autogen'd
|
||||
Sprite m_sprStepsType; // TODO: Make this an AutoActor
|
||||
|
||||
ThemeMetric<int> m_iNumTicks;
|
||||
ThemeMetric<int> m_iMaxTicks;
|
||||
ThemeMetric<bool> m_bShowTicks;
|
||||
ThemeMetric<bool> m_bShowMeter;
|
||||
ThemeMetric<bool> m_bShowDescription;
|
||||
ThemeMetric<RString> m_sZeroMeterString;
|
||||
ThemeMetric<bool> m_bShowAutogen;
|
||||
ThemeMetric<bool> m_bShowStepsType;
|
||||
ThemeMetric<RString> m_sZeroMeterString;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -476,21 +476,9 @@ void EditMenu::OnRowValueChanged( EditMenuRow row )
|
||||
// fall through
|
||||
case ROW_STEPS:
|
||||
{
|
||||
RString s = DifficultyToLocalizedString( GetSelectedDifficulty() );
|
||||
DifficultyDisplayType ddt = MakeDifficultyDisplayType( GetSelectedDifficulty(), GameManager::GetStepsTypeInfo(GetSelectedStepsType()).m_StepsTypeCategory );
|
||||
RString s = DifficultyDisplayTypeToLocalizedString( ddt );
|
||||
|
||||
// UGLY. "Edit" -> "New Edit"
|
||||
switch( EDIT_MODE.GetValue() )
|
||||
{
|
||||
case EditMode_Home:
|
||||
s = "New " + s;
|
||||
break;
|
||||
case EditMode_Practice:
|
||||
case EditMode_CourseMods:
|
||||
case EditMode_Full:
|
||||
break;
|
||||
default:
|
||||
ASSERT(0);
|
||||
}
|
||||
m_textValue[ROW_STEPS].SetText( s );
|
||||
}
|
||||
if( GetSelectedSteps() )
|
||||
@@ -533,9 +521,14 @@ void EditMenu::OnRowValueChanged( EditMenuRow row )
|
||||
{
|
||||
RString s;
|
||||
if( GetSelectedSourceDifficulty() == Difficulty_Invalid )
|
||||
{
|
||||
s = BLANK;
|
||||
}
|
||||
else
|
||||
s = DifficultyToLocalizedString(GetSelectedSourceDifficulty());
|
||||
{
|
||||
DifficultyDisplayType ddt = MakeDifficultyDisplayType( GetSelectedSourceDifficulty(), GameManager::GetStepsTypeInfo(GetSelectedSourceStepsType()).m_StepsTypeCategory );
|
||||
s = DifficultyDisplayTypeToLocalizedString( ddt );
|
||||
}
|
||||
m_textValue[ROW_SOURCE_STEPS].SetText( s );
|
||||
}
|
||||
bool bHideMeter = false;
|
||||
|
||||
@@ -2656,7 +2656,6 @@ const StepsTypeInfo &GameManager::GetStepsTypeInfo( StepsType st )
|
||||
{
|
||||
ASSERT( ARRAYLEN(g_StepsTypeInfos) == NUM_StepsType );
|
||||
ASSERT_M( st < NUM_StepsType, ssprintf("%i", st) );
|
||||
ASSERT_M( st < NUM_StepsType, ssprintf("%i", st) );
|
||||
return g_StepsTypeInfos[st];
|
||||
}
|
||||
|
||||
|
||||
@@ -2194,7 +2194,8 @@ public:
|
||||
for( unsigned i=0; i<vpStepsToShow.size(); i++ )
|
||||
{
|
||||
const Steps* pSteps = vpStepsToShow[i];
|
||||
RString sDifficulty = DifficultyToLocalizedString( pSteps->GetDifficulty() );
|
||||
DifficultyDisplayType ddt = MakeDifficultyDisplayType( pSteps->GetDifficulty(), GameManager::GetStepsTypeInfo(pSteps->m_StepsType).m_StepsTypeCategory );
|
||||
RString sDifficulty = DifficultyDisplayTypeToLocalizedString( ddt );
|
||||
|
||||
lua_pushstring( L, sDifficulty );
|
||||
lua_pushstring( L, pSteps->GetDescription() );
|
||||
|
||||
@@ -439,9 +439,17 @@ class OptionRowHandlerListSteps : public OptionRowHandlerList
|
||||
|
||||
RString s;
|
||||
if( pSteps->GetDifficulty() == Difficulty_Edit )
|
||||
{
|
||||
s = pSteps->GetDescription();
|
||||
}
|
||||
else
|
||||
s = DifficultyToLocalizedString( pSteps->GetDifficulty() );
|
||||
{
|
||||
DifficultyDisplayType ddt = MakeDifficultyDisplayType( pSteps->GetDifficulty(), GameManager::GetStepsTypeInfo(pSteps->m_StepsType).m_StepsTypeCategory );
|
||||
if( ddt == DifficultyDisplayType_Edit )
|
||||
s = pSteps->GetDescription();
|
||||
else
|
||||
s = DifficultyDisplayTypeToLocalizedString( ddt );
|
||||
}
|
||||
s += ssprintf( " %d", pSteps->GetMeter() );
|
||||
m_Def.m_vsChoices.push_back( s );
|
||||
GameCommand mc;
|
||||
@@ -553,7 +561,8 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
s = DifficultyToLocalizedString( dc );
|
||||
DifficultyDisplayType ddt = MakeDifficultyDisplayType( dc, GameManager::GetStepsTypeInfo( GAMESTATE->m_stEdit ).m_StepsTypeCategory );
|
||||
s = DifficultyDisplayTypeToLocalizedString( ddt );
|
||||
}
|
||||
m_Def.m_vsChoices.push_back( s );
|
||||
}
|
||||
@@ -729,7 +738,8 @@ class OptionRowHandlerListDifficulties: public OptionRowHandlerList
|
||||
|
||||
FOREACH_CONST( Difficulty, CommonMetrics::DIFFICULTIES_TO_SHOW.GetValue(), d )
|
||||
{
|
||||
RString s = DifficultyToLocalizedString( *d );
|
||||
DifficultyDisplayType ddt = MakeDifficultyDisplayType( *d, StepsTypeCategory_Single ); // TODO: Fix use of Single
|
||||
RString s = DifficultyDisplayTypeToLocalizedString( ddt );
|
||||
|
||||
m_Def.m_vsChoices.push_back( s );
|
||||
GameCommand mc;
|
||||
|
||||
@@ -2885,7 +2885,10 @@ void ScreenEdit::HandleMainMenuChoice( MainMenuChoice c, const vector<int> &iAns
|
||||
|
||||
g_StepsInformation.rows[difficulty].choices.clear();
|
||||
FOREACH_ENUM( Difficulty, dc )
|
||||
g_StepsInformation.rows[difficulty].choices.push_back( "|" + DifficultyToLocalizedString(pSteps->GetDifficulty()) );
|
||||
{
|
||||
DifficultyDisplayType ddt = MakeDifficultyDisplayType( dc, GameManager::GetStepsTypeInfo( pSteps->m_StepsType ).m_StepsTypeCategory );
|
||||
g_StepsInformation.rows[difficulty].choices.push_back( "|" + DifficultyDisplayTypeToString(ddt) );
|
||||
}
|
||||
g_StepsInformation.rows[difficulty].iDefaultChoice = pSteps->GetDifficulty();
|
||||
g_StepsInformation.rows[difficulty].bEnabled = (EDIT_MODE.GetValue() >= EditMode_Full);
|
||||
g_StepsInformation.rows[meter].iDefaultChoice = clamp( pSteps->GetMeter()-1, 0, MAX_METER+1 );
|
||||
|
||||
@@ -138,11 +138,7 @@ void ScreenEditMenu::MenuRight( const InputEventPlus &input )
|
||||
|
||||
static RString GetCopyDescription( const Steps *pSourceSteps )
|
||||
{
|
||||
RString s;
|
||||
if( pSourceSteps->GetDifficulty() == Difficulty_Edit )
|
||||
s = pSourceSteps->GetDescription();
|
||||
else
|
||||
s = DifficultyToLocalizedString( pSourceSteps->GetDifficulty() );
|
||||
RString s = pSourceSteps->GetDescription();
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
@@ -630,7 +630,7 @@ void ScreenGameplay::Init()
|
||||
PlayerNumber pn = pi->GetStepsAndTrailIndex();
|
||||
if( pn != PlayerNumber_Invalid )
|
||||
pi->m_pDifficultyDisplay->PlayCommand( "Set" + pi->GetName() );
|
||||
LOAD_ALL_COMMANDS( pi->m_pDifficultyDisplay );
|
||||
LOAD_ALL_COMMANDS_AND_SET_XY( pi->m_pDifficultyDisplay );
|
||||
this->AddChild( pi->m_pDifficultyDisplay );
|
||||
|
||||
// switch( GAMESTATE->m_PlayMode )
|
||||
|
||||
@@ -126,7 +126,10 @@ void ScreenOptionsEditCourseEntry::Init()
|
||||
pHand->m_Def.m_bOneChoiceForAllPlayers = true;
|
||||
pHand->m_Def.m_vsChoices.push_back( "(any)" );
|
||||
FOREACH_CONST( Difficulty, CommonMetrics::DIFFICULTIES_TO_SHOW.GetValue(), dc )
|
||||
pHand->m_Def.m_vsChoices.push_back( DifficultyToLocalizedString(*dc) );
|
||||
{
|
||||
DifficultyDisplayType ddt = MakeDifficultyDisplayType( *dc, GameManager::GetStepsTypeInfo( GAMESTATE->m_stEdit ).m_StepsTypeCategory );
|
||||
pHand->m_Def.m_vsChoices.push_back( DifficultyDisplayTypeToLocalizedString(ddt) );
|
||||
}
|
||||
vHands.push_back( pHand );
|
||||
|
||||
pHand = OptionRowHandlerUtil::MakeNull();
|
||||
|
||||
@@ -356,7 +356,10 @@ RString UnlockEntry::GetDescription() const
|
||||
case UnlockRewardType_Song:
|
||||
return pSong ? pSong->GetDisplayFullTitle() : "";
|
||||
case UnlockRewardType_Steps:
|
||||
return (pSong ? pSong->GetDisplayFullTitle() : "") + ", " + DifficultyToLocalizedString( m_dc );
|
||||
{
|
||||
DifficultyDisplayType ddt = MakeDifficultyDisplayType( m_dc, StepsTypeCategory_Single ); // TODO: Is using "Single" the best thing we can do here?
|
||||
return (pSong ? pSong->GetDisplayFullTitle() : "") + ", " + DifficultyDisplayTypeToLocalizedString( ddt );
|
||||
}
|
||||
case UnlockRewardType_Course:
|
||||
return m_Course.IsValid() ? m_Course.ToCourse()->GetDisplayFullTitle() : "";
|
||||
case UnlockRewardType_Modifier:
|
||||
|
||||
Reference in New Issue
Block a user