allow disabling song backgrounds (without disabling backgrounds entirely
with 0% Brightness, which gives an ugly black background)
This commit is contained in:
@@ -548,7 +548,15 @@ void BackgroundImpl::LoadFromSong( const Song* pSong )
|
||||
|
||||
|
||||
|
||||
if( pSong->HasBGChanges() )
|
||||
if( !PREFSMAN->m_bSongBackgrounds )
|
||||
{
|
||||
/* Backgrounds are disabled; just display the song background. */
|
||||
BackgroundChange change;
|
||||
change.m_def = m_StaticBackgroundDef;
|
||||
change.m_fStartBeat = 0;
|
||||
m_Layer[0].m_aBGChanges.push_back( change );
|
||||
}
|
||||
else if( pSong->HasBGChanges() )
|
||||
{
|
||||
FOREACH_BackgroundLayer( i )
|
||||
{
|
||||
|
||||
@@ -223,6 +223,7 @@ PrefsManager::PrefsManager() :
|
||||
m_bShowStats ( "ShowStats", TRUE_IF_DEBUG),
|
||||
m_bShowBanners ( "ShowBanners", true ),
|
||||
|
||||
m_bSongBackgrounds ( "SongBackgrounds", true ),
|
||||
m_RandomBackgroundMode ( "RandomBackgroundMode", BGMODE_ANIMATIONS ),
|
||||
m_iNumBackgrounds ( "NumBackgrounds", 8 ),
|
||||
m_fBGBrightness ( "BGBrightness", 0.8f ),
|
||||
|
||||
@@ -33,6 +33,7 @@ public:
|
||||
Preference<bool> m_bShowStats;
|
||||
Preference<bool> m_bShowBanners;
|
||||
|
||||
Preference<bool> m_bSongBackgrounds;
|
||||
enum RandomBackgroundMode { BGMODE_OFF, BGMODE_ANIMATIONS, BGMODE_RANDOMMOVIES, NUM_RandomBackgroundMode };
|
||||
Preference<RandomBackgroundMode,int> m_RandomBackgroundMode;
|
||||
Preference<int> m_iNumBackgrounds;
|
||||
|
||||
@@ -265,6 +265,17 @@ static void BGBrightness( int &sel, bool ToSel, const ConfOption *pConfOption )
|
||||
MoveMap( sel, pConfOption, ToSel, mapping, ARRAYSIZE(mapping) );
|
||||
}
|
||||
|
||||
static void BGBrightnessOrStatic( int &sel, bool ToSel, const ConfOption *pConfOption )
|
||||
{
|
||||
const float mapping[] = { 0.4f,0.4f,0.7f };
|
||||
MoveMap( sel, PREFSMAN->m_fBGBrightness, ToSel, mapping, ARRAYSIZE(mapping) );
|
||||
|
||||
if( ToSel && !PREFSMAN->m_bSongBackgrounds )
|
||||
sel = 0;
|
||||
if( !ToSel )
|
||||
PREFSMAN->m_bSongBackgrounds.Set( sel != 0 );
|
||||
}
|
||||
|
||||
static void NumBackgrounds( int &sel, bool ToSel, const ConfOption *pConfOption )
|
||||
{
|
||||
const int mapping[] = { 5,10,15,20 };
|
||||
@@ -527,6 +538,7 @@ static void InitializeConfOptions()
|
||||
/* Background options */
|
||||
ADD( ConfOption( "RandomBackgroundMode", MovePref, "OFF","ANIMATIONS","VISUALIZATIONS","RANDOM MOVIES" ) );
|
||||
ADD( ConfOption( "BGBrightness", BGBrightness, "0%","10%","20%","30%","40%","50%","60%","70%","80%","90%","100%" ) );
|
||||
ADD( ConfOption( "BGBrightnessOrStatic", BGBrightnessOrStatic,"DISABLED","DIM","BRIGHT" ) );
|
||||
ADD( ConfOption( "ShowDanger", MovePref, "HIDE","SHOW" ) );
|
||||
ADD( ConfOption( "ShowDancingCharacters", MovePref, "DEFAULT TO OFF","DEFAULT TO RANDOM","SELECT" ) );
|
||||
ADD( ConfOption( "ShowBeginnerHelper", MovePref, "OFF","ON" ) );
|
||||
|
||||
Reference in New Issue
Block a user