From 017faf527d81bcd43f40098772c5e395af2c3a96 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Sun, 13 Oct 2013 02:06:28 -0500 Subject: [PATCH] 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.) --- Themes/_fallback/Scripts/02 Actor.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Themes/_fallback/Scripts/02 Actor.lua b/Themes/_fallback/Scripts/02 Actor.lua index 93e2541c62..53364d203e 100644 --- a/Themes/_fallback/Scripts/02 Actor.lua +++ b/Themes/_fallback/Scripts/02 Actor.lua @@ -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