summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2016-05-27 17:25:32 +0200
committerAki <nthirtyone@gmail.com>2016-05-27 17:25:32 +0200
commit50fc48bf4e1de8382513da390eeece796f18926e (patch)
treec8f371e720dd632e89e69c404f18cda21b0046f4
parent8adcd1d14ee076d7a2db6303d0b5b938977d356b (diff)
downloadroflnauts-50fc48bf4e1de8382513da390eeece796f18926e.zip
roflnauts-50fc48bf4e1de8382513da390eeece796f18926e.tar.gz
roflnauts-50fc48bf4e1de8382513da390eeece796f18926e.tar.bz2
HUD for different resolutions
-rw-r--r--conf.lua4
-rw-r--r--world.lua5
2 files changed, 5 insertions, 4 deletions
diff --git a/conf.lua b/conf.lua
index 83175f0..45a5e7c 100644
--- a/conf.lua
+++ b/conf.lua
@@ -3,7 +3,7 @@ function love.conf(t)
t.title = "notnauts"
t.version = "0.10.1"
t.window.icon = "assets/icon.png"
- t.window.width = 290*4
+ t.window.width = 320*4
t.window.height = 180*4
- t.console = true
+ t.console = false
end \ No newline at end of file
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