From bf60e1dbf4ea7adbd528d2c81fa2dc644e502485 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Fri, 5 May 2006 23:09:52 +0000 Subject: [PATCH] add scale_or_crop_background --- stepmania/Themes/default/Scripts/Actor.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/stepmania/Themes/default/Scripts/Actor.lua b/stepmania/Themes/default/Scripts/Actor.lua index 8f964f4d9a..52ff6623cf 100644 --- a/stepmania/Themes/default/Scripts/Actor.lua +++ b/stepmania/Themes/default/Scripts/Actor.lua @@ -71,6 +71,15 @@ function ActorFrame:propagatecommand( cmd ) self:propagate(0); end +-- Most backgrounds are 640x480. Some are 768x480. Stretch the 640x480 ones. +function Actor:scale_or_crop_background() + if self:GetWidth() == 640 and self:GetHeight() == 480 then + self:stretchto( 0,0,SCREEN_WIDTH,SCREEN_HEIGHT ); + else + self:scaletocover( 0,0,SCREEN_WIDTH,SCREEN_HEIGHT ); + end +end + -- (c) 2006 Glenn Maynard -- All rights reserved. --