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