Files
itgmania212121/Themes/default/Scripts/02 Utilities.lua
T
ListenerJubatus f257f19dad Add new 5.1 default theme Lambda
I'd like to thank everyone who made this possible;, including but not
limited to Riakodoadm, MrThatKid, kyzentun, Luizsan, JoseVarelaP,
everyone else who provided feedback and bug reports.
2017-08-08 01:07:34 -06:00

6 lines
269 B
Lua

-- Placed here to keep shit from breaking until I get myself together long enough to deal with it all
function scale_to_fit(actor, width, height)
local xscale= width / actor:GetWidth()
local yscale= height / actor:GetHeight()
actor:zoom(math.min(xscale, yscale))
end