From e3fe3522631b6d9980bbca04a4a9fa55e400a95c Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Sat, 24 Mar 2007 02:57:32 +0000 Subject: [PATCH] Move to Sprite and use LoadBackground. --- stepmania/Themes/default/Scripts/Sprite.lua | 8 ++++++++ stepmania/Themes/default/Scripts/Utilities.lua | 4 ---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/stepmania/Themes/default/Scripts/Sprite.lua b/stepmania/Themes/default/Scripts/Sprite.lua index 5d412f4501..be7e9561f9 100644 --- a/stepmania/Themes/default/Scripts/Sprite.lua +++ b/stepmania/Themes/default/Scripts/Sprite.lua @@ -16,6 +16,14 @@ function Sprite:LoadFromSongBackground(song) self:LoadBackground( Path ) end +function LoadSongBackground() + return Def.Sprite { + DisableDimensionWarning=true; + OnCommand=cmd(LoadBackground,GetSongBackground()); + }; +end + + function Sprite:position( f ) self:GetTexture():position( f ); end diff --git a/stepmania/Themes/default/Scripts/Utilities.lua b/stepmania/Themes/default/Scripts/Utilities.lua index e42b5c4db6..dc226cba24 100644 --- a/stepmania/Themes/default/Scripts/Utilities.lua +++ b/stepmania/Themes/default/Scripts/Utilities.lua @@ -106,10 +106,6 @@ function GetSongBackground() return THEME:GetPathG("Common","fallback background") end -function LoadSongBackground() - return LoadActor( GetSongBackground() ) .. { DisableDimensionWarning=true; }; -end - -- (c) 2005 Glenn Maynard, Chris Danford -- All rights reserved. --