[PrefsManager] Add StretchBackgrounds preference.

This commit is contained in:
AJ Kelly
2012-06-02 23:03:47 -05:00
parent a9c8a9517b
commit a564f0c696
10 changed files with 52 additions and 7 deletions
+10 -1
View File
@@ -1,9 +1,18 @@
local Color1 = color(Var "Color1");
local Color2 = color(Var "Color2");
local stretchBG = PREFSMAN:GetPreference("StretchBackgrounds")
local t = Def.ActorFrame {
Def.Sprite {
OnCommand=cmd(LoadFromCurrentSongBackground;x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;scale_or_crop_background;diffuse,Color1;effectclock,"music");
OnCommand=function(self)
self:LoadFromCurrentSongBackground()
self:xy(SCREEN_CENTER_X,SCREEN_CENTER_Y)
if stretchBG then self:SetSize(SCREEN_WIDTH,SCREEN_HEIGHT)
else self:scale_or_crop_background();
end
self:diffuse(Color1)
self:effectclock("music")
end;
};
LoadActor(Var "File1") .. {
+9 -1
View File
@@ -1,8 +1,16 @@
local Color1 = color(Var "Color1");
local stretchBG = PREFSMAN:GetPreference("StretchBackgrounds")
local t = Def.ActorFrame {
LoadActor(Var "File1") .. {
OnCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;scale_or_crop_background;diffuse,Color1;effectclock,"music");
OnCommand=function(self)
self:xy(SCREEN_CENTER_X,SCREEN_CENTER_Y)
if stretchBG then self:SetSize(SCREEN_WIDTH,SCREEN_HEIGHT)
else self:scale_or_crop_background();
end
self:diffuse(Color1)
self:effectclock("music")
end;
GainFocusCommand=cmd(play);
LoseFocusCommand=cmd(pause);
};
+4
View File
@@ -8,6 +8,10 @@ ________________________________________________________________________________
StepMania 5.0 ???? ?? | 20120???
--------------------------------------------------------------------------------
2012/06/02
----------
* [PrefsManager] Added StretchBackgrounds preference. [AJ]
2012/05/31
----------
* [PaneDisplay] Added NullCountString metric. [AJ]
+2
View File
@@ -466,6 +466,7 @@ SoundVolumeAttract=Adjust the volume level during attract mode.
Speed=Speed
StepMania Credits=The StepMania Development Team.
Steps=Steps
StretchBackgrounds=Toggle the stretching of backgrounds.
Style=
Test Input=Test the responsiveness of connected joysticks.
Test Lights=Test the responsiveness of connected lights.
@@ -1083,6 +1084,7 @@ Speed=Speed
Step Author=Step Author
Steps=Steps
Stream=Stream
StretchBackgrounds=Stretch Backgrounds
Style=Style
Sub title=Sub title
Sub title transliteration=Sub title transliteration
+2 -1
View File
@@ -2926,7 +2926,7 @@ Line31="conf,FastLoadAdditionalSongs"
Fallback="ScreenOptionsServiceChild"
NextScreen="ScreenOptionsService"
PrevScreen="ScreenOptionsService"
LineNames="1,2,3,4,5,14,15,17,18,19"
LineNames="1,2,3,4,5,14,15,SB,17,18,19"
Line1="conf,Language"
Line2="conf,Announcer"
Line3="conf,Theme"
@@ -2934,6 +2934,7 @@ Line4="conf,DefaultNoteSkin"
Line5="conf,PercentageScoring"
Line14="conf,RandomBackgroundMode"
Line15="conf,BGBrightness"
LineSB="conf,StretchBackgrounds"
Line17="conf,ShowDancingCharacters"
Line18="conf,ShowBeginnerHelper"
Line19="conf,NumBackgrounds"
@@ -1,7 +1,15 @@
local t = Def.ActorFrame {};
t[#t+1] = Def.Sprite {
InitCommand=cmd(Center);
InitCommand=cmd(Center;diffusealpha,1);
BeginCommand=cmd(LoadFromCurrentSongBackground);
OnCommand=cmd(diffusealpha,1;scale_or_crop_background;linear,1;diffusealpha,0;);
OnCommand=function(self)
if PREFSMAN:GetPreference("StretchBackgrounds") then
self:SetSize(SCREEN_WIDTH,SCREEN_HEIGHT)
else
self:scale_or_crop_background()
end
self:linear(1)
self:diffusealpha(0)
end;
};
return t;
@@ -26,9 +26,19 @@ if GAMESTATE:IsCourseMode() then
t[#t+1] = LoadActor("CourseDisplay");
else
t[#t+1] = Def.Sprite {
InitCommand=cmd(Center);
InitCommand=cmd(Center;diffusealpha,0);
BeginCommand=cmd(LoadFromCurrentSongBackground);
OnCommand=cmd(diffusealpha,0;scale_or_crop_background;sleep,0.5;linear,0.50;diffusealpha,1;sleep,3);
OnCommand=function(self)
if PREFSMAN:GetPreference("StretchBackgrounds") then
self:SetSize(SCREEN_WIDTH,SCREEN_HEIGHT)
else
self:scale_or_crop_background()
end
self:sleep(0.5)
self:linear(0.50)
self:diffusealpha(1)
self:sleep(3)
end;
};
end
+1
View File
@@ -172,6 +172,7 @@ PrefsManager::PrefsManager() :
m_iDisplayColorDepth ( "DisplayColorDepth", 16 ),
m_iTextureColorDepth ( "TextureColorDepth", 16 ),
m_iMovieColorDepth ( "MovieColorDepth", 16 ),
m_bStretchBackgrounds ( "StretchBackgrounds", false ),
m_HighResolutionTextures ( "HighResolutionTextures", HighResolutionTextures_Auto ),
m_iMaxTextureResolution ( "MaxTextureResolution", 2048 ),
m_iRefreshRate ( "RefreshRate", REFRESH_DEFAULT ),
+1
View File
@@ -163,6 +163,7 @@ public:
Preference<int> m_iDisplayColorDepth;
Preference<int> m_iTextureColorDepth;
Preference<int> m_iMovieColorDepth;
Preference<bool> m_bStretchBackgrounds;
Preference<HighResolutionTextures> m_HighResolutionTextures;
Preference<int> m_iMaxTextureResolution;
Preference<int> m_iRefreshRate;
+1
View File
@@ -687,6 +687,7 @@ 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( "ShowDanger", MovePref<bool>, "Hide","Show" ) );
ADD( ConfOption( "ShowDancingCharacters", MovePref<ShowDancingCharacters>, "Default to Off","Default to Random","Select" ) );