diff --git a/Themes/_fallback/Scripts/01 alias.lua b/Themes/_fallback/Scripts/01 alias.lua index ce20d87b5f..5577185d06 100644 --- a/Themes/_fallback/Scripts/01 alias.lua +++ b/Themes/_fallback/Scripts/01 alias.lua @@ -1,15 +1,5 @@ --[[ command aliases ]] --- (this probably belongs in Sprite.lua) -function Sprite:cropto(w,h) - self:CropTo(w,h) -end - --- (this probably belongs in Actor.lua) -function Actor:SetSize(w,h) - self:setsize(w,h) -end - -- shorthand! this is tedious to type and makes things ugly so let's make it shorter. -- _screen.w, _screen.h, etc. _screen = { @@ -19,32 +9,21 @@ _screen = { cy = SCREEN_CENTER_Y } --- Title & Action safe calculation, probably messy. Uses microsofts suggestion of 85% ( 7.5% per side ) -function GetTitleSafeH( fPerc ) - return math.floor( SCREEN_RIGHT * fPerc ); -end - -function GetTitleSafeV( fPerc ) - return math.floor( SCREEN_BOTTOM * fPerc ); -end +-- Title & Action area safe calculation, probably messy. +-- Uses Microsoft's suggestion of 85% of the screen (7.5% per side). +function GetTitleSafeH( fPerc ) return math.floor( SCREEN_RIGHT * fPerc ); end +function GetTitleSafeV( fPerc ) return math.floor( SCREEN_BOTTOM * fPerc ); end SAFE_WIDTH = GetTitleSafeH(0.075); SAFE_HEIGHT = GetTitleSafeV(0.075); _safe = { - w = GetTitleSafeH(0.075); - h = GetTitleSafeV(0.075); + w = GetTitleSafeH(0.075); + h = GetTitleSafeV(0.075); } - --[[ compatibility aliases ]] ---[[ Actor ]] -function Actor:hidden(bHide) - Warn("hidden is deprecated, use visible instead. (used on ".. self:GetName() ..")") - self:visible(not bHide) -end - --[[ ActorScroller: all of these got renamed, so alias the lowercase ones if themes are going to look for them. ]] ActorScroller.getsecondtodestination = ActorScroller.GetSecondsToDestination diff --git a/Themes/_fallback/Scripts/02 Actor.lua b/Themes/_fallback/Scripts/02 Actor.lua index 1a1813421b..4372b177f6 100644 --- a/Themes/_fallback/Scripts/02 Actor.lua +++ b/Themes/_fallback/Scripts/02 Actor.lua @@ -371,6 +371,15 @@ function GetRealInverse() return res/theme end +-- command aliases: +function Actor:SetSize(w,h) self:setsize(w,h) end + +-- deprecated aliases: +function Actor:hidden(bHide) + Warn("hidden is deprecated, use visible instead. (used on ".. self:GetName() ..")") + self:visible(not bHide) +end + -- (c) 2006-2011 Glenn Maynard, SSC -- All rights reserved. -- diff --git a/Themes/_fallback/Scripts/02 Sprite.lua b/Themes/_fallback/Scripts/02 Sprite.lua index bb931eb67a..905f05dbad 100644 --- a/Themes/_fallback/Scripts/02 Sprite.lua +++ b/Themes/_fallback/Scripts/02 Sprite.lua @@ -65,6 +65,9 @@ function Sprite.LinearFrames(NumFrames, Seconds) return Frames end +-- command aliases: +function Sprite:cropto(w,h) self:CropTo(w,h) end + -- (c) 2005 Glenn Maynard -- All rights reserved. -- diff --git a/Themes/_fallback/Scripts/02 Utilities.lua b/Themes/_fallback/Scripts/02 Utilities.lua index 0480c87471..0a1fb2d014 100644 --- a/Themes/_fallback/Scripts/02 Utilities.lua +++ b/Themes/_fallback/Scripts/02 Utilities.lua @@ -334,16 +334,6 @@ function WideScale(AR4_3, AR16_9) return scale( SCREEN_WIDTH, 640, 854, AR4_3, AR16_9 ) end --- it turns out some people actually used this (mostly) worthless code: -AspectRatios = { - ThreeFour = 0.75, -- (576x760 at 1024x768) - OneOne = 1.0, -- 480x480 (uses Y) - FiveFour = 1.25, -- 600x480 (1280x1024 is a real use) - FourThree = 1.33333, --* 640x480 - SixteenTen = 1.6, --* 720x480 - SixteenNine = 1.77778, --* 853x480 - EightThree = 2.66666, -- 1280x480 -}; local function round(num, idp) if idp and idp > 0 then