/ critline landscape scaling
This commit is contained in:
parent
42874906c8
commit
d9c1664f66
|
@ -8,10 +8,22 @@ local CRITBAR_H = 348
|
|||
|
||||
local scale;
|
||||
|
||||
local isLandscape = false;
|
||||
|
||||
local setUpTransforms = function (x,y,rotation)
|
||||
local resx, resy = game.GetResolution()
|
||||
local desw = 1080
|
||||
local desh = 1920
|
||||
local resx, resy = game.GetResolution();
|
||||
isLandscape = resx > resy;
|
||||
|
||||
local desw, desh;
|
||||
|
||||
if (isLandscape) then
|
||||
desw = 1920;
|
||||
desh = 1080;
|
||||
else
|
||||
desw = 1080;
|
||||
desh = 1920;
|
||||
end
|
||||
|
||||
scale = resx / desw
|
||||
|
||||
gfx.Translate(x, y)
|
||||
|
|
Loading…
Reference in New Issue