Stretch backgrounds based on preference

It turns out we have a preference called StretchBackgrounds and this
seems like the perfect place to use it. Also we may want to set it to
true then by default, I don't know.

(Sourced from shakesoda/stepmania.)
This commit is contained in:
AJ Kelly
2013-10-13 02:06:28 -05:00
parent e329e91602
commit 017faf527d
+6 -1
View File
@@ -152,7 +152,12 @@ function Actor:FullScreen()
end
function Actor:scale_or_crop_background()
self:cropto(SCREEN_WIDTH, SCREEN_HEIGHT)
if PREFSMAN:GetPreference("StretchBackgrounds") then
self:cropto(SCREEN_WIDTH, SCREEN_HEIGHT)
else
local graphicAspect = self:GetWidth()/self:GetHeight()
self:zoomto(SCREEN_HEIGHT*graphicAspect,SCREEN_HEIGHT)
end
end
function Actor:CenterX() self:x(SCREEN_CENTER_X) end