diff --git a/stepmania/src/CatalogXml.cpp b/stepmania/src/CatalogXml.cpp index 8de1ee33b9..8cf24a26bb 100644 --- a/stepmania/src/CatalogXml.cpp +++ b/stepmania/src/CatalogXml.cpp @@ -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) ); } } diff --git a/stepmania/src/Course.cpp b/stepmania/src/Course.cpp index faf2c980a5..9ba5064204 100644 --- a/stepmania/src/Course.cpp +++ b/stepmania/src/Course.cpp @@ -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 ) diff --git a/stepmania/src/Difficulty.cpp b/stepmania/src/Difficulty.cpp index d0b87f12fc..5cfb9c5d50 100644 --- a/stepmania/src/Difficulty.cpp +++ b/stepmania/src/Difficulty.cpp @@ -15,9 +15,27 @@ static const char *DifficultyNames[] = { "Edit", }; XToString( Difficulty ); -XToLocalizedString( Difficulty ); LuaXType( Difficulty ); -LuaFunction( DifficultyToLocalizedString, DifficultyToLocalizedString( Enum::Check(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(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. diff --git a/stepmania/src/Difficulty.h b/stepmania/src/Difficulty.h index a88b0e4f89..0bab3017a5 100644 --- a/stepmania/src/Difficulty.h +++ b/stepmania/src/Difficulty.h @@ -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 /* diff --git a/stepmania/src/DifficultyDisplay.cpp b/stepmania/src/DifficultyDisplay.cpp index d21011b25f..fbd35d2066 100644 --- a/stepmania/src/DifficultyDisplay.cpp +++ b/stepmania/src/DifficultyDisplay.cpp @@ -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 ThemeMetrics, 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 ); } diff --git a/stepmania/src/DifficultyDisplay.h b/stepmania/src/DifficultyDisplay.h index 6d102a9285..3444d3209b 100644 --- a/stepmania/src/DifficultyDisplay.h +++ b/stepmania/src/DifficultyDisplay.h @@ -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 m_iNumTicks; ThemeMetric m_iMaxTicks; ThemeMetric m_bShowTicks; ThemeMetric m_bShowMeter; ThemeMetric m_bShowDescription; - ThemeMetric m_sZeroMeterString; + ThemeMetric m_bShowAutogen; + ThemeMetric m_bShowStepsType; + ThemeMetric m_sZeroMeterString; }; #endif diff --git a/stepmania/src/EditMenu.cpp b/stepmania/src/EditMenu.cpp index 4d10d4da8d..cea04a4cba 100644 --- a/stepmania/src/EditMenu.cpp +++ b/stepmania/src/EditMenu.cpp @@ -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; diff --git a/stepmania/src/GameManager.cpp b/stepmania/src/GameManager.cpp index ad7ff60aef..c2709f4172 100644 --- a/stepmania/src/GameManager.cpp +++ b/stepmania/src/GameManager.cpp @@ -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]; } diff --git a/stepmania/src/GameState.cpp b/stepmania/src/GameState.cpp index 87407d85cd..ea7eb4e93c 100644 --- a/stepmania/src/GameState.cpp +++ b/stepmania/src/GameState.cpp @@ -2194,7 +2194,8 @@ public: for( unsigned i=0; iGetDifficulty() ); + 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() ); diff --git a/stepmania/src/OptionRowHandler.cpp b/stepmania/src/OptionRowHandler.cpp index b7bfbc0dee..b1da106218 100644 --- a/stepmania/src/OptionRowHandler.cpp +++ b/stepmania/src/OptionRowHandler.cpp @@ -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; diff --git a/stepmania/src/ScreenEdit.cpp b/stepmania/src/ScreenEdit.cpp index 80a85668c0..612ffb969e 100644 --- a/stepmania/src/ScreenEdit.cpp +++ b/stepmania/src/ScreenEdit.cpp @@ -2885,7 +2885,10 @@ void ScreenEdit::HandleMainMenuChoice( MainMenuChoice c, const vector &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 ); diff --git a/stepmania/src/ScreenEditMenu.cpp b/stepmania/src/ScreenEditMenu.cpp index 3be7de5d14..4ebdc52968 100644 --- a/stepmania/src/ScreenEditMenu.cpp +++ b/stepmania/src/ScreenEditMenu.cpp @@ -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; } diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index e090f18405..0fd504c260 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -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 ) diff --git a/stepmania/src/ScreenOptionsEditCourseEntry.cpp b/stepmania/src/ScreenOptionsEditCourseEntry.cpp index 590386d490..2e4f636b64 100644 --- a/stepmania/src/ScreenOptionsEditCourseEntry.cpp +++ b/stepmania/src/ScreenOptionsEditCourseEntry.cpp @@ -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(); diff --git a/stepmania/src/UnlockManager.cpp b/stepmania/src/UnlockManager.cpp index 7865d0a8de..79b55640b2 100644 --- a/stepmania/src/UnlockManager.cpp +++ b/stepmania/src/UnlockManager.cpp @@ -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: