From 3e6b2eba89525f1b20acfe50f993f7aed2f98dcd Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 15 Dec 2002 10:25:20 +0000 Subject: [PATCH] add an option to not display the select group screen --- stepmania/Themes/default/metrics.ini | 1 + stepmania/src/PrefsManager.cpp | 3 +++ stepmania/src/PrefsManager.h | 2 +- stepmania/src/ScreenAppearanceOptions.cpp | 4 ++++ stepmania/src/ScreenSelectGroup.cpp | 22 +++++++++++++++------- 5 files changed, 24 insertions(+), 8 deletions(-) diff --git a/stepmania/Themes/default/metrics.ini b/stepmania/Themes/default/metrics.ini index f6440ff2db..b9d0594067 100644 --- a/stepmania/Themes/default/metrics.ini +++ b/stepmania/Themes/default/metrics.ini @@ -726,6 +726,7 @@ Theme=Choose from this list of installed theme packs.::For more information abou NoteSkin=Choose from this list of installed note skins.::For more information about creating a note skin, see the README. HowToPlay=Toggle whether the How To Play screen is shown. Caution=Toggle whether the Caution screen is shown. +SongGroup=Toggle whether the Select Group screen is shown. [ScreenNetworkWaiting] ServerInfoX=320 diff --git a/stepmania/src/PrefsManager.cpp b/stepmania/src/PrefsManager.cpp index 26a230d2b4..404f64d4b9 100644 --- a/stepmania/src/PrefsManager.cpp +++ b/stepmania/src/PrefsManager.cpp @@ -61,6 +61,7 @@ PrefsManager::PrefsManager() m_bDelayedEscape = true; m_bHowToPlay = true; m_bShowDontDie = true; + m_bShowSelectGroup = true; m_bArcadeOptionsNavigation = false; m_iUnloadTextureDelaySeconds = 0; // disabled 60*30; // 30 mins m_bCoinOpMode = false; @@ -114,6 +115,7 @@ PrefsManager::~PrefsManager() ini.GetValueB( "Options", "Vsync", m_bVsync ); ini.GetValueB( "Options", "HowToPlay", m_bHowToPlay ); ini.GetValueB( "Options", "Caution", m_bShowDontDie ); + ini.GetValueB( "Options", "SelectGroup", m_bShowSelectGroup ); ini.GetValueB( "Options", "ArcadeOptionsNavigation", m_bArcadeOptionsNavigation ); ini.GetValue ( "Options", "DWIPath", m_DWIPath ); ini.GetValueI( "Options", "UnloadTextureDelaySeconds", m_iUnloadTextureDelaySeconds ); @@ -167,6 +169,7 @@ void PrefsManager::SaveGlobalPrefsToDisk() ini.SetValueB( "Options", "Vsync", m_bVsync ); ini.SetValueB( "Options", "HowToPlay", m_bHowToPlay ); ini.SetValueB( "Options", "Caution", m_bShowDontDie ); + ini.SetValueB( "Options", "SelectGroup", m_bShowSelectGroup ); ini.SetValueB( "Options", "ArcadeOptionsNavigation", m_bArcadeOptionsNavigation ); ini.SetValue ( "Options", "DWIPath", m_DWIPath ); ini.SetValueI( "Options", "UnloadTextureDelaySeconds", m_iUnloadTextureDelaySeconds ); diff --git a/stepmania/src/PrefsManager.h b/stepmania/src/PrefsManager.h index f6633586d2..7a2efee1a4 100644 --- a/stepmania/src/PrefsManager.h +++ b/stepmania/src/PrefsManager.h @@ -49,7 +49,7 @@ public: float m_fJudgeWindowGoodPercent; bool m_bAutoPlay; bool m_bDelayedEscape; - bool m_bHowToPlay, m_bShowDontDie; + bool m_bHowToPlay, m_bShowDontDie, m_bShowSelectGroup; bool m_bArcadeOptionsNavigation; bool m_bCoinOpMode; diff --git a/stepmania/src/ScreenAppearanceOptions.cpp b/stepmania/src/ScreenAppearanceOptions.cpp index a055f9473d..68fe0b2dae 100644 --- a/stepmania/src/ScreenAppearanceOptions.cpp +++ b/stepmania/src/ScreenAppearanceOptions.cpp @@ -32,6 +32,7 @@ enum { AO_SKIN, AO_HOWTOPLAY, AO_CAUTION, + AO_SELECT_GROUP, NUM_APPEARANCE_OPTIONS_LINES }; @@ -41,6 +42,7 @@ OptionRowData g_AppearanceOptionsLines[NUM_APPEARANCE_OPTIONS_LINES] = { { "Note\nSkin", 0, {""} }, // fill this in on ImportOptions() { "How To\nPlay", 2, {"SKIP","SHOW"} }, { "Caution", 2, {"SKIP","SHOW"} }, + { "Song\nGroup", 2, {"ALL MUSIC","CHOOSE"} }, }; ScreenAppearanceOptions::ScreenAppearanceOptions() : @@ -152,6 +154,7 @@ void ScreenAppearanceOptions::ImportOptions() m_iSelectedOption[0][AO_HOWTOPLAY] = PREFSMAN->m_bHowToPlay? 1:0; m_iSelectedOption[0][AO_CAUTION] = PREFSMAN->m_bShowDontDie? 1:0; + m_iSelectedOption[0][AO_SELECT_GROUP] = PREFSMAN->m_bShowSelectGroup? 1:0; } void ScreenAppearanceOptions::ExportOptions() @@ -175,6 +178,7 @@ void ScreenAppearanceOptions::ExportOptions() PREFSMAN->m_bHowToPlay = !!m_iSelectedOption[0][AO_HOWTOPLAY]; PREFSMAN->m_bShowDontDie = !!m_iSelectedOption[0][AO_CAUTION]; + PREFSMAN->m_bShowSelectGroup = !!m_iSelectedOption[0][AO_SELECT_GROUP]; PREFSMAN->SaveGamePrefsToDisk(); PREFSMAN->SaveGlobalPrefsToDisk(); diff --git a/stepmania/src/ScreenSelectGroup.cpp b/stepmania/src/ScreenSelectGroup.cpp index cefc307f33..acc3d9ff81 100644 --- a/stepmania/src/ScreenSelectGroup.cpp +++ b/stepmania/src/ScreenSelectGroup.cpp @@ -52,6 +52,21 @@ ScreenSelectGroup::ScreenSelectGroup() LOG->Trace( "ScreenSelectGroup::ScreenSelectGroup()" ); + m_Menu.Load( + THEME->GetPathTo("BGAnimations","select group") , + THEME->GetPathTo("Graphics","select group top edge"), + HELP_TEXT, true, true, TIMER_SECONDS + ); + this->AddChild( &m_Menu ); + + if(!PREFSMAN->m_bShowSelectGroup) + { + GAMESTATE->m_sPreferredGroup = "ALL MUSIC"; + m_Menu.ImmedOffScreenToMenu(); + this->SendScreenMessage( SM_GoToNextScreen, 0.f ); + return; + } + unsigned i; int j; @@ -116,13 +131,6 @@ ScreenSelectGroup::ScreenSelectGroup() m_bChosen = false; - m_Menu.Load( - THEME->GetPathTo("BGAnimations","select group") , - THEME->GetPathTo("Graphics","select group top edge"), - HELP_TEXT, true, true, TIMER_SECONDS - ); - this->AddChild( &m_Menu ); - m_sprExplanation.Load( THEME->GetPathTo("Graphics","select group explanation") ); m_sprExplanation.SetXY( EXPLANATION_X, EXPLANATION_Y ); this->AddChild( &m_sprExplanation );