diff --git a/stepmania/Themes/default/metrics.ini b/stepmania/Themes/default/metrics.ini index bb2f1842ec..7a115f0617 100644 --- a/stepmania/Themes/default/metrics.ini +++ b/stepmania/Themes/default/metrics.ini @@ -785,4 +785,19 @@ Sprite0-effect=RC Sprite0-speed=0.005 Sprite0-zoom=5.0 Sprite0-X=CENTER_X -Sprite0-Y=-350 \ No newline at end of file +Sprite0-Y=-350 + +[bganims-para-0] +NumElements=0 + + +[bganims-para-1] +NumElements=0 + + +[bganims-para-2] +NumElements=0 + + +[bganims-para-3] +NumElements=0 \ No newline at end of file diff --git a/stepmania/src/ScreenEz2SelectStyle.cpp b/stepmania/src/ScreenEz2SelectStyle.cpp index ce8d6919e3..81320f6c88 100644 --- a/stepmania/src/ScreenEz2SelectStyle.cpp +++ b/stepmania/src/ScreenEz2SelectStyle.cpp @@ -35,7 +35,8 @@ const ScreenMessage SM_GoToNextScreen = ScreenMessage(SM_User + 2); #define HELP_TEXT THEME->GetMetric("ScreenEz2SelectStyle","HelpText") #define TIMER_SECONDS THEME->GetMetricI("ScreenEz2SelectStyle","TimerSeconds") #define NEXT_SCREEN THEME->GetMetric("ScreenEz2SelectStyle","NextScreen") - +#define USE_METRIC_FOR_MENU THEME->GetMetricI("ScreenEz2SelectStyle","UseMetricForMenu") +#define SCROLLING_ELEMENT_SPACING THEME->GetMetricI("ScreenEz2SelectStyle","ScrollingElementSpacing") const float TWEEN_TIME = 0.35f; @@ -61,11 +62,11 @@ ScreenEz2SelectStyle::ScreenEz2SelectStyle() } m_BGAnim[0].SetZoom(1.0f); + m_ScrollingList.SetXY( CENTER_X, CENTER_Y ); + m_ScrollingList.SetSpacing( SCROLLING_ELEMENT_SPACING ); + m_ScrollingList.SetNumberVisible( 5 ); + this->AddChild( &m_ScrollingList ); - m_ScrollingList.SetXY( CENTER_X, CENTER_Y ); - m_ScrollingList.SetSpacing( 400 ); - m_ScrollingList.SetNumberVisible( 5 ); - this->AddChild( &m_ScrollingList ); for( int p=0; pLoadAndPlayIfNotAlready( THEME->GetPathTo("Sounds","select style music") ); - RefreshStylesAndList(); + if (USE_METRIC_FOR_MENU == 1) // get it from the metrics + { + int numstyles = THEME->GetMetricI("ScreenEz2SelectStyle","NumStyles"); // get the number of styles we need + + CStringArray asGraphicPaths; + for (i=0; iGetPathTo("Graphics",ssprintf("%s",THEME->GetMetric("ScreenEz2SelectStyle",ssprintf("StyleGraphic%d",i) ) ) ) ); + } + + m_ScrollingList.Load( asGraphicPaths ); + + } + else // get it from the styles.... + { + RefreshStylesAndList(); + } TweenOnScreen(); m_Menu.TweenOnScreenFromBlack( SM_None ); @@ -218,6 +235,7 @@ void ScreenEz2SelectStyle::RefreshStylesAndList() } CStringArray asGraphicPaths; + for( i=0; iGetGameplayStylesForGame( GAMESTATE->m_CurGame, m_aPossibleStyles ); + GAMESTATE->m_CurStyle = m_aPossibleStyles[ THEME->GetMetricI("ScreenEz2SelectStyle",ssprintf("UseStyle%d",chosen) ) ]; + + int m_diSelection = THEME->GetMetricI("ScreenEz2SelectStyle",ssprintf("UseDifficulty%d",chosen) ); + + switch( m_diSelection ) + { + case 0: GAMESTATE->m_PreferredDifficultyClass[PLAYER_1] = CLASS_EASY; break; + case 1: GAMESTATE->m_PreferredDifficultyClass[PLAYER_1] = CLASS_MEDIUM; break; + case 2: GAMESTATE->m_PreferredDifficultyClass[PLAYER_1] = CLASS_HARD; break; + } + + } + else // get it from the scrolling list + { GAMESTATE->m_CurStyle = m_aPossibleStyles[m_ScrollingList.GetSelection()]; + } TweenOffScreen(); m_Menu.TweenOffScreenToMenu( SM_GoToNextScreen ); }