Added BackgroundFitMode preference and setting screen for controlling how backgrounds are fitted to the screen.

This commit is contained in:
Kyzentun
2014-08-16 03:37:24 -06:00
parent 4ac7e2ad2d
commit 9b2c59de46
17 changed files with 378 additions and 20 deletions
+12
View File
@@ -125,6 +125,17 @@ XToString( CourseSortOrders );
StringToX( CourseSortOrders );
LuaXType( CourseSortOrders );
static const char *BackgroundFitModeNames[] = {
"CoverDistort",
"CoverPreserve",
"FitInside",
"FitInsideAvoidLetter",
"FitInsideAvoidPillar",
};
XToString( BackgroundFitMode );
StringToX( BackgroundFitMode );
LuaXType( BackgroundFitMode );
bool g_bAutoRestart = false;
#ifdef DEBUG
# define TRUE_IF_DEBUG true
@@ -162,6 +173,7 @@ PrefsManager::PrefsManager() :
m_iTextureColorDepth ( "TextureColorDepth", 16 ),
m_iMovieColorDepth ( "MovieColorDepth", 16 ),
m_bStretchBackgrounds ( "StretchBackgrounds", false ),
m_BGFitMode("BackgroundFitMode", BFM_CoverPreserve),
m_HighResolutionTextures ( "HighResolutionTextures", HighResolutionTextures_Auto ),
m_iMaxTextureResolution ( "MaxTextureResolution", 2048 ),
m_iRefreshRate ( "RefreshRate", REFRESH_DEFAULT ),
+11
View File
@@ -111,6 +111,16 @@ enum CourseSortOrders
NUM_CourseSortOrders,
CourseSortOrders_Invalid
};
enum BackgroundFitMode
{
BFM_CoverDistort,
BFM_CoverPreserve,
BFM_FitInside,
BFM_FitInsideAvoidLetter,
BFM_FitInsideAvoidPillar,
NUM_BackgroundFitMode,
BackgroundFitMode_Invalid
};
/** @brief Holds user-chosen preferences that are saved between sessions. */
class PrefsManager
@@ -154,6 +164,7 @@ public:
Preference<int> m_iTextureColorDepth;
Preference<int> m_iMovieColorDepth;
Preference<bool> m_bStretchBackgrounds;
Preference<BackgroundFitMode> m_BGFitMode;
Preference<HighResolutionTextures> m_HighResolutionTextures;
Preference<int> m_iMaxTextureResolution;
Preference<int> m_iRefreshRate;
+2 -1
View File
@@ -692,7 +692,8 @@ static void InitializeConfOptions()
g_ConfOptions.back().m_sPrefName = "BGBrightness";
ADD( ConfOption( "BGBrightnessOrStatic", BGBrightnessOrStatic, "Disabled","25% Bright","50% Bright","75% Bright" ) );
g_ConfOptions.back().m_sPrefName = "BGBrightness";
ADD( ConfOption( "StretchBackgrounds", MovePref<bool>, "Off","On" ) );
ADD( ConfOption( "StretchBackgrounds", MovePref<bool>, "Off","On" ) ); // Deprecated, unused by default/_fallback. -Kyz
ADD( ConfOption( "BackgroundFitMode", MovePref<BackgroundFitMode>, "CoverDistort", "CoverPreserve", "FitInside", "FitInsideAvoidLetter", "FitInsideAvoidPillar") );
ADD( ConfOption( "ShowDanger", MovePref<bool>, "Hide","Show" ) );
ADD( ConfOption( "ShowDancingCharacters", MovePref<ShowDancingCharacters>, "Default to Off","Default to Random","Select" ) );