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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user