From 50fc48bf4e1de8382513da390eeece796f18926e Mon Sep 17 00:00:00 2001 From: Aki Date: Fri, 27 May 2016 17:25:32 +0200 Subject: HUD for different resolutions --- world.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'world.lua') diff --git a/world.lua b/world.lua index 0b70bcb..86ba1e3 100644 --- a/world.lua +++ b/world.lua @@ -225,9 +225,10 @@ function World:draw() for _,naut in pairs(self.Nauts) do -- I have no idea where to place them T_T -- let's do: bottom-left, bottom-right, top-left, top-right + local w, h = love.graphics.getWidth()/scale, love.graphics.getHeight()/scale local y, e = 1, 1 - if _ < 3 then y, e = 180-33, 0 end - naut:drawHUD(1+(_%2)*(290-34), y, scale, e) + if _ < 3 then y, e = h-33, 0 end + naut:drawHUD(1+(_%2)*(w-34), y, scale, e) end end -- cgit v1.1