diff --git a/scripts/gameplay/crit_line.lua b/scripts/gameplay/crit_line.lua index 250976f..b8f435f 100644 --- a/scripts/gameplay/crit_line.lua +++ b/scripts/gameplay/crit_line.lua @@ -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)