Per-game theme preference now remembered if value is "default"
This commit is contained in:
@@ -19,8 +19,6 @@ get rid of lines between tiles
|
||||
|
||||
red life glow in sync with beat
|
||||
|
||||
kpt web site - NOW!
|
||||
|
||||
No no, I know about chaning group colors but when in ABC sort they're all red
|
||||
|
||||
on Ez2, the Ranking doesn't save (AAA, AA, A, B e.t.c.)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Possible NextScreen Codes:
|
||||
// - ScreenCaution
|
||||
// - ScreenEz2SelectPlayer
|
||||
// - ScreenEz2SelectStyle
|
||||
// - ScreenSelectMode
|
||||
// - ScreenHowToPlay
|
||||
// - ScreenSelectCourse
|
||||
// - ScreenSelectDifficulty
|
||||
@@ -76,7 +76,7 @@ HelpText=Use ! " to select, then press START
|
||||
TimerSeconds=40
|
||||
NextScreen=ScreenSelectDifficulty
|
||||
|
||||
[ScreenEz2SelectStyle]
|
||||
[ScreenSelectMode]
|
||||
CursorP1X=120
|
||||
CursorP1Y=335
|
||||
CursorP2X=520
|
||||
@@ -91,6 +91,7 @@ NextScreen=ScreenSelectGroup
|
||||
ScrollingListX=320
|
||||
ScrollingListY=250
|
||||
UseSelectionBGAnimations=0
|
||||
SelectionSpecificBGAnimations=0
|
||||
|
||||
[ScreenSelectDifficulty]
|
||||
MorePage1X=580
|
||||
|
||||
@@ -169,15 +169,15 @@ void PrefsManager::ReadGamePrefsFromDisk()
|
||||
|
||||
CString sGameName = GAMESTATE->GetCurrentGameDef()->m_szName;
|
||||
IniFile ini;
|
||||
ini.SetPath( sGameName + "Prefs.ini" );
|
||||
ini.SetPath( "StepMania.ini" );
|
||||
ini.ReadFile(); // it's OK if this fails
|
||||
|
||||
CString sAnnouncer = sGameName, sTheme = sGameName, sNoteSkin = sGameName;
|
||||
|
||||
// if these calls fail, the three strings will keep the initial values set above.
|
||||
ini.GetValue( "Options", "Announcer", sAnnouncer );
|
||||
ini.GetValue( "Options", "Theme", sTheme );
|
||||
ini.GetValue( "Options", "NoteSkin", sNoteSkin );
|
||||
ini.GetValue( sGameName, "Announcer", sAnnouncer );
|
||||
ini.GetValue( sGameName, "Theme", sTheme );
|
||||
ini.GetValue( sGameName, "NoteSkin", sNoteSkin );
|
||||
|
||||
// it's OK to call these functions with names that don't exist.
|
||||
ANNOUNCER->SwitchAnnouncer( sAnnouncer );
|
||||
@@ -192,11 +192,12 @@ void PrefsManager::SaveGamePrefsToDisk()
|
||||
|
||||
CString sGameName = GAMESTATE->GetCurrentGameDef()->m_szName;
|
||||
IniFile ini;
|
||||
ini.SetPath( sGameName + "Prefs.ini" );
|
||||
ini.SetPath( "StepMania.ini" );
|
||||
ini.ReadFile(); // it's OK if this fails
|
||||
|
||||
ini.SetValue( "Options", "Announcer", ANNOUNCER->GetCurAnnouncerName() );
|
||||
ini.SetValue( "Options", "Theme", THEME->GetCurThemeName() );
|
||||
ini.SetValue( "Options", "NoteSkin", GAMEMAN->GetCurNoteSkin() );
|
||||
ini.SetValue( sGameName, "Announcer", ANNOUNCER->GetCurAnnouncerName() );
|
||||
ini.SetValue( sGameName, "Theme", THEME->GetCurThemeName() );
|
||||
ini.SetValue( sGameName, "NoteSkin", GAMEMAN->GetCurNoteSkin() );
|
||||
|
||||
ini.WriteFile();
|
||||
}
|
||||
|
||||
@@ -153,6 +153,9 @@ void ScreenAppearanceOptions::ImportOptions()
|
||||
|
||||
void ScreenAppearanceOptions::ExportOptions()
|
||||
{
|
||||
PREFSMAN->SaveGamePrefsToDisk();
|
||||
PREFSMAN->SaveGlobalPrefsToDisk();
|
||||
|
||||
int iSelectedAnnouncer = m_iSelectedOption[0][AO_ANNOUNCER];
|
||||
CString sNewAnnouncer = m_OptionRowData[AO_ANNOUNCER].szOptionsText[iSelectedAnnouncer];
|
||||
if( iSelectedAnnouncer == 0 )
|
||||
|
||||
@@ -91,7 +91,7 @@ ScreenEz2SelectPlayer::ScreenEz2SelectPlayer()
|
||||
}
|
||||
|
||||
/************************************
|
||||
~ScreenEz2SelectStyle (Destructor)
|
||||
~ScreenSelectMode (Destructor)
|
||||
Desc: Writes line to log when screen
|
||||
is terminated.
|
||||
************************************/
|
||||
|
||||
@@ -160,7 +160,7 @@ void ScreenManager::Input( const DeviceInput& DeviceI, const InputEventType type
|
||||
#include "ScreenEditMenu.h"
|
||||
#include "ScreenEvaluation.h"
|
||||
#include "ScreenEz2SelectPlayer.h"
|
||||
#include "ScreenEz2SelectStyle.h"
|
||||
#include "ScreenSelectMode.h"
|
||||
#include "ScreenGameOver.h"
|
||||
#include "ScreenGameplay.h"
|
||||
#include "ScreenGraphicOptions.h"
|
||||
@@ -197,7 +197,7 @@ Screen* ScreenManager::MakeNewScreen( CString sClassName )
|
||||
else if( 0==stricmp(sClassName, "ScreenEvaluation") ) return new ScreenEvaluation;
|
||||
else if( 0==stricmp(sClassName, "ScreenFinalEvaluation") ) return new ScreenFinalEvaluation;
|
||||
else if( 0==stricmp(sClassName, "ScreenEz2SelectPlayer") ) return new ScreenEz2SelectPlayer;
|
||||
else if( 0==stricmp(sClassName, "ScreenEz2SelectStyle") ) return new ScreenEz2SelectStyle;
|
||||
else if( 0==stricmp(sClassName, "ScreenSelectMode") ) return new ScreenSelectMode;
|
||||
else if( 0==stricmp(sClassName, "ScreenGameOver") ) return new ScreenGameOver;
|
||||
else if( 0==stricmp(sClassName, "ScreenGameplay") ) return new ScreenGameplay;
|
||||
else if( 0==stricmp(sClassName, "ScreenGraphicOptions") ) return new ScreenGraphicOptions;
|
||||
|
||||
@@ -84,15 +84,9 @@ ScreenTitleMenu::ScreenTitleMenu()
|
||||
{
|
||||
CString sGameName = GAMESTATE->GetCurrentGameDef()->m_szName;
|
||||
if( THEME->DoesThemeExist( sGameName ) )
|
||||
{
|
||||
THEME->SwitchTheme( sGameName );
|
||||
}
|
||||
else
|
||||
{
|
||||
CStringArray asThemeNames;
|
||||
THEME->GetThemeNamesForCurGame( asThemeNames );
|
||||
THEME->SwitchTheme( asThemeNames[0] );
|
||||
}
|
||||
THEME->SwitchTheme( "default" );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -213,12 +213,6 @@ cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
|
||||
<File
|
||||
RelativePath="ScreenEz2SelectPlayer.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="ScreenEz2SelectStyle.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="ScreenEz2SelectStyle.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="ScreenGameOver.cpp">
|
||||
</File>
|
||||
@@ -324,6 +318,12 @@ cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
|
||||
<File
|
||||
RelativePath="ScreenSelectGroup.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="ScreenSelectMode.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="ScreenSelectMode.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="ScreenSelectMusic.cpp">
|
||||
</File>
|
||||
|
||||
@@ -86,9 +86,7 @@ bool ThemeManager::DoesThemeExist( CString sThemeName )
|
||||
|
||||
void ThemeManager::SwitchTheme( CString sThemeName )
|
||||
{
|
||||
if( 0==stricmp(BASE_THEME_NAME, sThemeName) )
|
||||
m_sCurThemeName = ""; // can't select the base theme
|
||||
else if( !DoesThemeExist(sThemeName) )
|
||||
if( !DoesThemeExist(sThemeName) )
|
||||
m_sCurThemeName = BASE_THEME_NAME;
|
||||
else
|
||||
m_sCurThemeName = sThemeName;
|
||||
|
||||
Reference in New Issue
Block a user