/ critline landscape scaling

This commit is contained in:
FajsiEx 2021-11-26 20:56:56 +01:00
parent 42874906c8
commit d9c1664f66
1 changed files with 15 additions and 3 deletions

View File

@ -8,10 +8,22 @@ local CRITBAR_H = 348
local scale; local scale;
local isLandscape = false;
local setUpTransforms = function (x,y,rotation) local setUpTransforms = function (x,y,rotation)
local resx, resy = game.GetResolution() local resx, resy = game.GetResolution();
local desw = 1080 isLandscape = resx > resy;
local desh = 1920
local desw, desh;
if (isLandscape) then
desw = 1920;
desh = 1080;
else
desw = 1080;
desh = 1920;
end
scale = resx / desw scale = resx / desw
gfx.Translate(x, y) gfx.Translate(x, y)