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
Row6Y=300
Row7Y=340
[ScreenOptionsMenu]
InputOptions=
MachineOptions=
GraphicOptions=
AppearanceOptions=
+2 -2
View File
@@ -190,13 +190,13 @@ void ScreenAppearanceOptions::ExportOptions()
void ScreenAppearanceOptions::GoToPrevState()
{
GoToNextState();
SCREENMAN->SetNewScreen( "ScreenOptionsMenu" );
}
void ScreenAppearanceOptions::GoToNextState()
{
PREFSMAN->SaveGamePrefsToDisk();
SCREENMAN->SetNewScreen( "ScreenTitleMenu" );
GoToPrevState();
}
+3 -3
View File
@@ -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();
}
+2 -2
View File
@@ -104,12 +104,12 @@ void ScreenInputOptions::ExportOptions()
void ScreenInputOptions::GoToPrevState()
{
SCREENMAN->SetNewScreen( "ScreenTitleMenu" );
PREFSMAN->SaveGlobalPrefsToDisk();
SCREENMAN->SetNewScreen( "ScreenOptionsMenu" );
}
void ScreenInputOptions::GoToNextState()
{
PREFSMAN->SaveGlobalPrefsToDisk();
GoToPrevState();
}
+2 -2
View File
@@ -168,12 +168,12 @@ void ScreenMachineOptions::ExportOptions()
void ScreenMachineOptions::GoToPrevState()
{
SCREENMAN->SetNewScreen( "ScreenTitleMenu" );
PREFSMAN->SaveGlobalPrefsToDisk();
SCREENMAN->SetNewScreen( "ScreenOptionsMenu" );
}
void ScreenMachineOptions::GoToNextState()
{
PREFSMAN->SaveGlobalPrefsToDisk();
GoToPrevState();
}
+2
View File
@@ -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() );
+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_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" );
+4 -10
View File
@@ -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",
+2 -2
View File
@@ -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 */
+10 -2
View File
@@ -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
+6
View File
@@ -321,6 +321,12 @@ cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
<File
RelativePath="ScreenOptions.h">
</File>
<File
RelativePath="ScreenOptionsMenu.cpp">
</File>
<File
RelativePath="ScreenOptionsMenu.h">
</File>
<File
RelativePath="ScreenPlayerOptions.cpp">
</File>