options menu re-organization to solve TitleMenu clutter

This commit is contained in:
Chris Danford
2003-01-31 23:31:35 +00:00
parent ebce24b57e
commit e80943fb53
13 changed files with 181 additions and 40 deletions
+8
View File
@@ -868,3 +868,11 @@ Row4Y=220
Row5Y=260 Row5Y=260
Row6Y=300 Row6Y=300
Row7Y=340 Row7Y=340
[ScreenOptionsMenu]
InputOptions=
MachineOptions=
GraphicOptions=
AppearanceOptions=
+2 -2
View File
@@ -190,13 +190,13 @@ void ScreenAppearanceOptions::ExportOptions()
void ScreenAppearanceOptions::GoToPrevState() void ScreenAppearanceOptions::GoToPrevState()
{ {
GoToNextState(); SCREENMAN->SetNewScreen( "ScreenOptionsMenu" );
} }
void ScreenAppearanceOptions::GoToNextState() void ScreenAppearanceOptions::GoToNextState()
{ {
PREFSMAN->SaveGamePrefsToDisk(); PREFSMAN->SaveGamePrefsToDisk();
SCREENMAN->SetNewScreen( "ScreenTitleMenu" ); GoToPrevState();
} }
+3 -3
View File
@@ -194,13 +194,13 @@ void ScreenGraphicOptions::ExportOptions()
void ScreenGraphicOptions::GoToPrevState() void ScreenGraphicOptions::GoToPrevState()
{ {
SCREENMAN->SetNewScreen( "ScreenTitleMenu" ); SCREENMAN->SetNewScreen( "ScreenOptionsMenu" );
PREFSMAN->SaveGlobalPrefsToDisk();
ApplyGraphicOptions();
} }
void ScreenGraphicOptions::GoToNextState() void ScreenGraphicOptions::GoToNextState()
{ {
PREFSMAN->SaveGlobalPrefsToDisk();
ApplyGraphicOptions();
GoToPrevState(); GoToPrevState();
} }
+2 -2
View File
@@ -104,12 +104,12 @@ void ScreenInputOptions::ExportOptions()
void ScreenInputOptions::GoToPrevState() void ScreenInputOptions::GoToPrevState()
{ {
SCREENMAN->SetNewScreen( "ScreenTitleMenu" ); SCREENMAN->SetNewScreen( "ScreenOptionsMenu" );
PREFSMAN->SaveGlobalPrefsToDisk();
} }
void ScreenInputOptions::GoToNextState() void ScreenInputOptions::GoToNextState()
{ {
PREFSMAN->SaveGlobalPrefsToDisk();
GoToPrevState(); GoToPrevState();
} }
+2 -2
View File
@@ -168,12 +168,12 @@ void ScreenMachineOptions::ExportOptions()
void ScreenMachineOptions::GoToPrevState() void ScreenMachineOptions::GoToPrevState()
{ {
SCREENMAN->SetNewScreen( "ScreenTitleMenu" ); SCREENMAN->SetNewScreen( "ScreenOptionsMenu" );
PREFSMAN->SaveGlobalPrefsToDisk();
} }
void ScreenMachineOptions::GoToNextState() void ScreenMachineOptions::GoToNextState()
{ {
PREFSMAN->SaveGlobalPrefsToDisk();
GoToPrevState(); GoToPrevState();
} }
+2
View File
@@ -202,6 +202,7 @@ void ScreenManager::Input( const DeviceInput& DeviceI, const InputEventType type
#include "ScreenInstructions.h" #include "ScreenInstructions.h"
#include "ScreenNameEntry.h" #include "ScreenNameEntry.h"
#include "ScreenJukebox.h" #include "ScreenJukebox.h"
#include "ScreenOptionsMenu.h"
#include "ScreenPrompt.h" #include "ScreenPrompt.h"
#include "ScreenTextEntry.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, "ScreenInstructions") ) ret = new ScreenInstructions;
else if( 0==stricmp(sClassName, "ScreenNameEntry") ) ret = new ScreenNameEntry; else if( 0==stricmp(sClassName, "ScreenNameEntry") ) ret = new ScreenNameEntry;
else if( 0==stricmp(sClassName, "ScreenJukebox") ) ret = new ScreenJukebox; else if( 0==stricmp(sClassName, "ScreenJukebox") ) ret = new ScreenJukebox;
else if( 0==stricmp(sClassName, "ScreenOptionsMenu") ) ret = new ScreenOptionsMenu;
else else
RageException::Throw( "Invalid Screen class name '%s'", sClassName.GetString() ); RageException::Throw( "Invalid Screen class name '%s'", sClassName.GetString() );
+103
View File
@@ -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; i<NUM_OPTIONS_MENU_LINES; i++ )
{
CString sLineName = g_OptionsMenuLines[i].szOptionsText[0];
sLineName.Replace("\n","");
sLineName.Replace(" ","");
strcpy( g_OptionsMenuLines[i].szExplanation, THEME->GetMetric("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");
}
}
+32
View File
@@ -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();
};
+5 -17
View File
@@ -207,11 +207,8 @@ void ScreenTitleMenu::Input( const DeviceInput& DeviceI, const InputEventType ty
{ {
case CHOICE_GAME_START: case CHOICE_GAME_START:
case CHOICE_SELECT_GAME: case CHOICE_SELECT_GAME:
case CHOICE_MAP_INSTRUMENTS: case CHOICE_MAP_KEY_JOY:
case CHOICE_INPUT_OPTIONS: case CHOICE_OPTIONS:
case CHOICE_MACHINE_OPTIONS:
case CHOICE_GRAPHIC_OPTIONS:
case CHOICE_APPEARANCE_OPTIONS:
case CHOICE_JUKEBOX: case CHOICE_JUKEBOX:
#ifdef _DEBUG #ifdef _DEBUG
case CHOICE_SANDBOX: case CHOICE_SANDBOX:
@@ -277,20 +274,11 @@ void ScreenTitleMenu::HandleScreenMessage( const ScreenMessage SM )
case CHOICE_SELECT_GAME: case CHOICE_SELECT_GAME:
SCREENMAN->SetNewScreen( "ScreenSelectGame" ); SCREENMAN->SetNewScreen( "ScreenSelectGame" );
break; break;
case CHOICE_MAP_INSTRUMENTS: case CHOICE_MAP_KEY_JOY:
SCREENMAN->SetNewScreen( "ScreenMapControllers" ); SCREENMAN->SetNewScreen( "ScreenMapControllers" );
break; break;
case CHOICE_INPUT_OPTIONS: case CHOICE_OPTIONS:
SCREENMAN->SetNewScreen( "ScreenInputOptions" ); SCREENMAN->SetNewScreen( "ScreenOptionsMenu" );
break;
case CHOICE_MACHINE_OPTIONS:
SCREENMAN->SetNewScreen( "ScreenMachineOptions" );
break;
case CHOICE_GRAPHIC_OPTIONS:
SCREENMAN->SetNewScreen( "ScreenGraphicOptions" );
break;
case CHOICE_APPEARANCE_OPTIONS:
SCREENMAN->SetNewScreen( "ScreenAppearanceOptions" );
break; break;
case CHOICE_JUKEBOX: case CHOICE_JUKEBOX:
SCREENMAN->SetNewScreen( "ScreenJukebox" ); SCREENMAN->SetNewScreen( "ScreenJukebox" );
+4 -10
View File
@@ -32,11 +32,8 @@ public:
{ {
CHOICE_GAME_START = 0, CHOICE_GAME_START = 0,
CHOICE_SELECT_GAME, CHOICE_SELECT_GAME,
CHOICE_MAP_INSTRUMENTS, CHOICE_MAP_KEY_JOY,
CHOICE_INPUT_OPTIONS, CHOICE_OPTIONS,
CHOICE_MACHINE_OPTIONS,
CHOICE_GRAPHIC_OPTIONS,
CHOICE_APPEARANCE_OPTIONS,
CHOICE_EDIT, CHOICE_EDIT,
CHOICE_JUKEBOX, CHOICE_JUKEBOX,
#ifdef _DEBUG #ifdef _DEBUG
@@ -52,11 +49,8 @@ public:
"GAME START", "GAME START",
"SWITCH GAME", "SWITCH GAME",
"CONFIG KEY/JOY", "CONFIG KEY/JOY",
"INPUT OPTIONS", "OPTIONS",
"MACHINE OPTIONS", "EDIT/SYNC SONGS",
"GRAPHIC OPTIONS",
"APPEARANCE OPTIONS",
"EDIT/SYNCHRONIZE",
"JUKEBOX", "JUKEBOX",
#ifdef _DEBUG #ifdef _DEBUG
"SANDBOX", "SANDBOX",
+8
View File
@@ -1565,6 +1565,14 @@ SOURCE=.\ScreenOptions.h
# End Source File # End Source File
# Begin 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 SOURCE=.\ScreenPlayerOptions.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
+6
View File
@@ -321,6 +321,12 @@ cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
<File <File
RelativePath="ScreenOptions.h"> RelativePath="ScreenOptions.h">
</File> </File>
<File
RelativePath="ScreenOptionsMenu.cpp">
</File>
<File
RelativePath="ScreenOptionsMenu.h">
</File>
<File <File
RelativePath="ScreenPlayerOptions.cpp"> RelativePath="ScreenPlayerOptions.cpp">
</File> </File>