Added BackgroundFitMode preference and setting screen for controlling how backgrounds are fitted to the screen.
This commit is contained in:
@@ -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 ),
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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" ) );
|
||||
|
||||
Reference in New Issue
Block a user