okay, this seems to work better for scale_or_crop_background(), but I haven't tested it with things like 320x240 backgrounds yet.

This commit is contained in:
AJ Kelly
2012-01-06 01:53:52 -06:00
parent 4c6edf67f0
commit 40779f4daa
+1 -10
View File
@@ -168,16 +168,7 @@ function Actor:scale_or_crop_background()
-- bga matches the current aspect, we can stretch it.
self:stretchto( 0,0,SCREEN_WIDTH,SCREEN_HEIGHT )
else
-- temp
self:scaletocover( 0,0,SCREEN_WIDTH,SCREEN_HEIGHT )
--[[
-- bga doesn't match the aspect.
if displayAspect > graphicAspect then
-- the graphic is smaller than the display aspect ratio
else
-- the graphic is bigger than the display aspect ratio; crop me
end
--]]
self:scaletofit( SCREEN_CENTER_X-(gw/2),SCREEN_TOP,SCREEN_CENTER_X+(gw/2),SCREEN_HEIGHT)
end
end