diff --git a/stepmania/Themes/default/metrics.ini b/stepmania/Themes/default/metrics.ini index 3fd5527fb4..6e9aaeb7bf 100644 --- a/stepmania/Themes/default/metrics.ini +++ b/stepmania/Themes/default/metrics.ini @@ -868,3 +868,11 @@ Row4Y=220 Row5Y=260 Row6Y=300 Row7Y=340 + +[ScreenOptionsMenu] +InputOptions= +MachineOptions= +GraphicOptions= +AppearanceOptions= + + diff --git a/stepmania/src/ScreenAppearanceOptions.cpp b/stepmania/src/ScreenAppearanceOptions.cpp index 18668bd745..2b3c7a3e24 100644 --- a/stepmania/src/ScreenAppearanceOptions.cpp +++ b/stepmania/src/ScreenAppearanceOptions.cpp @@ -190,13 +190,13 @@ void ScreenAppearanceOptions::ExportOptions() void ScreenAppearanceOptions::GoToPrevState() { - GoToNextState(); + SCREENMAN->SetNewScreen( "ScreenOptionsMenu" ); } void ScreenAppearanceOptions::GoToNextState() { PREFSMAN->SaveGamePrefsToDisk(); - SCREENMAN->SetNewScreen( "ScreenTitleMenu" ); + GoToPrevState(); } diff --git a/stepmania/src/ScreenGraphicOptions.cpp b/stepmania/src/ScreenGraphicOptions.cpp index a7d416d962..10d1b5e25a 100644 --- a/stepmania/src/ScreenGraphicOptions.cpp +++ b/stepmania/src/ScreenGraphicOptions.cpp @@ -194,13 +194,13 @@ void ScreenGraphicOptions::ExportOptions() void ScreenGraphicOptions::GoToPrevState() { - SCREENMAN->SetNewScreen( "ScreenTitleMenu" ); - PREFSMAN->SaveGlobalPrefsToDisk(); - ApplyGraphicOptions(); + SCREENMAN->SetNewScreen( "ScreenOptionsMenu" ); } void ScreenGraphicOptions::GoToNextState() { + PREFSMAN->SaveGlobalPrefsToDisk(); + ApplyGraphicOptions(); GoToPrevState(); } diff --git a/stepmania/src/ScreenInputOptions.cpp b/stepmania/src/ScreenInputOptions.cpp index 9631f6c6b8..a47794a136 100644 --- a/stepmania/src/ScreenInputOptions.cpp +++ b/stepmania/src/ScreenInputOptions.cpp @@ -104,12 +104,12 @@ void ScreenInputOptions::ExportOptions() void ScreenInputOptions::GoToPrevState() { - SCREENMAN->SetNewScreen( "ScreenTitleMenu" ); - PREFSMAN->SaveGlobalPrefsToDisk(); + SCREENMAN->SetNewScreen( "ScreenOptionsMenu" ); } void ScreenInputOptions::GoToNextState() { + PREFSMAN->SaveGlobalPrefsToDisk(); GoToPrevState(); } diff --git a/stepmania/src/ScreenMachineOptions.cpp b/stepmania/src/ScreenMachineOptions.cpp index 16a48a543d..a0013a91cb 100644 --- a/stepmania/src/ScreenMachineOptions.cpp +++ b/stepmania/src/ScreenMachineOptions.cpp @@ -168,12 +168,12 @@ void ScreenMachineOptions::ExportOptions() void ScreenMachineOptions::GoToPrevState() { - SCREENMAN->SetNewScreen( "ScreenTitleMenu" ); - PREFSMAN->SaveGlobalPrefsToDisk(); + SCREENMAN->SetNewScreen( "ScreenOptionsMenu" ); } void ScreenMachineOptions::GoToNextState() { + PREFSMAN->SaveGlobalPrefsToDisk(); GoToPrevState(); } diff --git a/stepmania/src/ScreenManager.cpp b/stepmania/src/ScreenManager.cpp index 6daa78504e..900f10f5bd 100644 --- a/stepmania/src/ScreenManager.cpp +++ b/stepmania/src/ScreenManager.cpp @@ -202,6 +202,7 @@ void ScreenManager::Input( const DeviceInput& DeviceI, const InputEventType type #include "ScreenInstructions.h" #include "ScreenNameEntry.h" #include "ScreenJukebox.h" +#include "ScreenOptionsMenu.h" #include "ScreenPrompt.h" #include "ScreenTextEntry.h" @@ -254,6 +255,7 @@ Screen* ScreenManager::MakeNewScreen( CString sClassName ) else if( 0==stricmp(sClassName, "ScreenInstructions") ) ret = new ScreenInstructions; else if( 0==stricmp(sClassName, "ScreenNameEntry") ) ret = new ScreenNameEntry; else if( 0==stricmp(sClassName, "ScreenJukebox") ) ret = new ScreenJukebox; + else if( 0==stricmp(sClassName, "ScreenOptionsMenu") ) ret = new ScreenOptionsMenu; else RageException::Throw( "Invalid Screen class name '%s'", sClassName.GetString() ); diff --git a/stepmania/src/ScreenOptionsMenu.cpp b/stepmania/src/ScreenOptionsMenu.cpp new file mode 100644 index 0000000000..42d499c8d5 --- /dev/null +++ b/stepmania/src/ScreenOptionsMenu.cpp @@ -0,0 +1,103 @@ +#include "stdafx.h" +/* +----------------------------------------------------------------------------- + Class: ScreenOptionsMenu + + Desc: See header. + + Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved. + Chris Danford +----------------------------------------------------------------------------- +*/ + +#include "ScreenOptionsMenu.h" +#include "RageTextureManager.h" +#include "RageUtil.h" +#include "RageSoundManager.h" +#include "ScreenManager.h" +#include "PrefsManager.h" +#include "GameConstantsAndTypes.h" +#include "StepMania.h" +#include "PrefsManager.h" +#include "RageLog.h" +#include "AnnouncerManager.h" +#include "GameManager.h" +#include "GameState.h" +#include "ThemeManager.h" + + +enum { + OM_INPUT = 0, + OM_MACHINE, + OM_GRAPHIC, + OM_APPEARANCE, + NUM_OPTIONS_MENU_LINES +}; + +OptionRowData g_OptionsMenuLines[NUM_OPTIONS_MENU_LINES] = { + { "", 1, {"Input Options"} }, + { "", 1, {"Machine Options"} }, + { "", 1, {"Graphic Options"} }, + { "", 1, {"Appearance Options"} }, +}; + +ScreenOptionsMenu::ScreenOptionsMenu() : + ScreenOptions( + THEME->GetPathTo("BGAnimations","options menu"), + THEME->GetPathTo("Graphics","options menu page"), + THEME->GetPathTo("Graphics","options menu top edge") + ) +{ + LOG->Trace( "ScreenOptionsMenu::ScreenOptionsMenu()" ); + + // fill g_InputOptionsLines with explanation text + for( int i=0; iGetMetric("ScreenOptionsMenu",sLineName) ); + } + + Init( + INPUTMODE_BOTH, + g_OptionsMenuLines, + NUM_OPTIONS_MENU_LINES, + false ); + m_Menu.SetTimer( 99 ); + m_Menu.StopTimer(); + + SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","options menu music") ); +} + +void ScreenOptionsMenu::ImportOptions() +{ +} + +void ScreenOptionsMenu::ExportOptions() +{ + +} + +void ScreenOptionsMenu::GoToPrevState() +{ + SCREENMAN->SetNewScreen( "ScreenTitleMenu" ); +} + +void ScreenOptionsMenu::GoToNextState() +{ + switch( this->m_iCurrentRow[0] ) + { + case OM_INPUT: SCREENMAN->SetNewScreen("ScreenInputOptions"); break; + case OM_MACHINE: SCREENMAN->SetNewScreen("ScreenMachineOptions"); break; + case OM_GRAPHIC: SCREENMAN->SetNewScreen("ScreenGraphicOptions"); break; + case OM_APPEARANCE: SCREENMAN->SetNewScreen("ScreenAppearanceOptions"); break; + default: // Exit + SCREENMAN->SetNewScreen("ScreenTitleMenu"); + } +} + + + + + diff --git a/stepmania/src/ScreenOptionsMenu.h b/stepmania/src/ScreenOptionsMenu.h new file mode 100644 index 0000000000..82d8bf33a0 --- /dev/null +++ b/stepmania/src/ScreenOptionsMenu.h @@ -0,0 +1,32 @@ +/* +----------------------------------------------------------------------------- + Class: ScreenOptionsMenu + + Desc: Select a theme and announcer. + + Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved. + Chris Danford +----------------------------------------------------------------------------- +*/ + +#include "Screen.h" +#include "ScreenOptions.h" +#include "Sprite.h" +#include "BitmapText.h" +#include "RandomSample.h" +#include "TransitionFade.h" +#include "Quad.h" + + +class ScreenOptionsMenu : public ScreenOptions +{ +public: + ScreenOptionsMenu(); + +private: + void ImportOptions(); + void ExportOptions(); + + void GoToNextState(); + void GoToPrevState(); +}; diff --git a/stepmania/src/ScreenTitleMenu.cpp b/stepmania/src/ScreenTitleMenu.cpp index ccb5daa4cb..8e8d2987e8 100644 --- a/stepmania/src/ScreenTitleMenu.cpp +++ b/stepmania/src/ScreenTitleMenu.cpp @@ -207,11 +207,8 @@ void ScreenTitleMenu::Input( const DeviceInput& DeviceI, const InputEventType ty { case CHOICE_GAME_START: case CHOICE_SELECT_GAME: - case CHOICE_MAP_INSTRUMENTS: - case CHOICE_INPUT_OPTIONS: - case CHOICE_MACHINE_OPTIONS: - case CHOICE_GRAPHIC_OPTIONS: - case CHOICE_APPEARANCE_OPTIONS: + case CHOICE_MAP_KEY_JOY: + case CHOICE_OPTIONS: case CHOICE_JUKEBOX: #ifdef _DEBUG case CHOICE_SANDBOX: @@ -277,20 +274,11 @@ void ScreenTitleMenu::HandleScreenMessage( const ScreenMessage SM ) case CHOICE_SELECT_GAME: SCREENMAN->SetNewScreen( "ScreenSelectGame" ); break; - case CHOICE_MAP_INSTRUMENTS: + case CHOICE_MAP_KEY_JOY: SCREENMAN->SetNewScreen( "ScreenMapControllers" ); break; - case CHOICE_INPUT_OPTIONS: - SCREENMAN->SetNewScreen( "ScreenInputOptions" ); - break; - case CHOICE_MACHINE_OPTIONS: - SCREENMAN->SetNewScreen( "ScreenMachineOptions" ); - break; - case CHOICE_GRAPHIC_OPTIONS: - SCREENMAN->SetNewScreen( "ScreenGraphicOptions" ); - break; - case CHOICE_APPEARANCE_OPTIONS: - SCREENMAN->SetNewScreen( "ScreenAppearanceOptions" ); + case CHOICE_OPTIONS: + SCREENMAN->SetNewScreen( "ScreenOptionsMenu" ); break; case CHOICE_JUKEBOX: SCREENMAN->SetNewScreen( "ScreenJukebox" ); diff --git a/stepmania/src/ScreenTitleMenu.h b/stepmania/src/ScreenTitleMenu.h index e898cc4ba9..6c479cb07f 100644 --- a/stepmania/src/ScreenTitleMenu.h +++ b/stepmania/src/ScreenTitleMenu.h @@ -32,11 +32,8 @@ public: { CHOICE_GAME_START = 0, CHOICE_SELECT_GAME, - CHOICE_MAP_INSTRUMENTS, - CHOICE_INPUT_OPTIONS, - CHOICE_MACHINE_OPTIONS, - CHOICE_GRAPHIC_OPTIONS, - CHOICE_APPEARANCE_OPTIONS, + CHOICE_MAP_KEY_JOY, + CHOICE_OPTIONS, CHOICE_EDIT, CHOICE_JUKEBOX, #ifdef _DEBUG @@ -52,11 +49,8 @@ public: "GAME START", "SWITCH GAME", "CONFIG KEY/JOY", - "INPUT OPTIONS", - "MACHINE OPTIONS", - "GRAPHIC OPTIONS", - "APPEARANCE OPTIONS", - "EDIT/SYNCHRONIZE", + "OPTIONS", + "EDIT/SYNC SONGS", "JUKEBOX", #ifdef _DEBUG "SANDBOX", diff --git a/stepmania/src/StepMania.cpp b/stepmania/src/StepMania.cpp index 132edaddd1..050ab777b8 100644 --- a/stepmania/src/StepMania.cpp +++ b/stepmania/src/StepMania.cpp @@ -452,8 +452,8 @@ static void HandleInputEvents(float fDeltaTime) if(DeviceI == DeviceInput(DEVICE_KEYBOARD, SDLK_RETURN)) { - if( INPUTMAN->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD, SDLK_RALT)) || - INPUTMAN->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD, SDLK_LALT)) ) + if( INPUTMAN->IsBeingPressed(DeviceInput(DEVICE_KEYBOARD, SDLK_RALT)) || + INPUTMAN->IsBeingPressed(DeviceInput(DEVICE_KEYBOARD, SDLK_LALT)) ) { if(type != IET_FIRST_PRESS) continue; /* alt-enter */ diff --git a/stepmania/src/StepMania.dsp b/stepmania/src/StepMania.dsp index a236d74b20..c15e698853 100644 --- a/stepmania/src/StepMania.dsp +++ b/stepmania/src/StepMania.dsp @@ -60,7 +60,7 @@ IntDir=.\../Release6 TargetDir=\stepmania\stepmania TargetName=StepMania SOURCE="$(InputPath)" -PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ +PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi ia32.vdi # End Special Build Tool @@ -95,7 +95,7 @@ IntDir=.\../Debug6 TargetDir=\stepmania\stepmania TargetName=StepMania-debug SOURCE="$(InputPath)" -PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ +PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi ia32.vdi # End Special Build Tool @@ -1565,6 +1565,14 @@ SOURCE=.\ScreenOptions.h # End Source File # Begin Source File +SOURCE=.\ScreenOptionsMenu.cpp +# End Source File +# Begin Source File + +SOURCE=.\ScreenOptionsMenu.h +# End Source File +# Begin Source File + SOURCE=.\ScreenPlayerOptions.cpp # End Source File # Begin Source File diff --git a/stepmania/src/StepMania.vcproj b/stepmania/src/StepMania.vcproj index 9a71d31c33..a6d35a3870 100644 --- a/stepmania/src/StepMania.vcproj +++ b/stepmania/src/StepMania.vcproj @@ -321,6 +321,12 @@ cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ + + + +