summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBwa <b.was@infbud.pl>2017-01-16 20:55:50 +0000
committerBwa <b.was@infbud.pl>2017-01-16 20:55:50 +0000
commitfb03473d5fe4b76df5ce2633a8fd6d1dd43b8ad6 (patch)
treed77798ff35b8089bb290ad5ad49821246bbbf683
parentb444f9a4e637a62bb0f7bc451c9c6d200d97505b (diff)
parenta287845bf622e2669c42ba5261b1c86a2229b741 (diff)
downloadlove2d-signage-fb03473d5fe4b76df5ce2633a8fd6d1dd43b8ad6.tar.gz
love2d-signage-fb03473d5fe4b76df5ce2633a8fd6d1dd43b8ad6.tar.bz2
love2d-signage-fb03473d5fe4b76df5ce2633a8fd6d1dd43b8ad6.tar.xz
love2d-signage-fb03473d5fe4b76df5ce2633a8fd6d1dd43b8ad6.zip
Merge branch 'master' of ssh://hackerspace.pl/informatic/love2d-signage
merge with upstream master
-rw-r--r--config.lua2
-rw-r--r--main.lua2
-rw-r--r--nodes/time.lua4
3 files changed, 5 insertions, 3 deletions
diff --git a/config.lua b/config.lua
index 442bf1b..615baa6 100644
--- a/config.lua
+++ b/config.lua
@@ -7,4 +7,6 @@ return {
{'nodes.slideshow', fileName='images/logo.png', displayTime=5},
},
environment = os.getenv('ENV') or 'prod',
+ renderWidth = 1280,
+ renderHeight = 720,
}
diff --git a/main.lua b/main.lua
index 87fe2ee..844f0f3 100644
--- a/main.lua
+++ b/main.lua
@@ -14,7 +14,7 @@ local debugGraph = require('vendor.debugGraph')
local fpsGraph, memGraph;
-local gameWidth, gameHeight = 1280, 720
+local gameWidth, gameHeight = config.renderWidth, config.renderHeight
local windowWidth, windowHeight = love.window.getDesktopDimensions()
windowWidth, windowHeight = windowWidth*.5, windowHeight*.5 --make the window a bit smaller than the screen itself
diff --git a/nodes/time.lua b/nodes/time.lua
index 129fd4a..7f8befc 100644
--- a/nodes/time.lua
+++ b/nodes/time.lua
@@ -10,10 +10,10 @@ function node:render()
love.graphics.setColor( 255, 255, 255 )
love.graphics.setFont(textFont);
- love.graphics.printf(os.date('%H:%M'), 0, 100, love.graphics.getWidth(), 'center');
+ love.graphics.printf(os.date('%H:%M'), 0, 0.14*love.graphics.getHeight(), love.graphics.getWidth(), 'center');
love.graphics.setFont(smallFont);
- love.graphics.printf(os.date('%Y/%m/%d'), 0, 575, love.graphics.getWidth(), 'center');
+ love.graphics.printf(os.date('%Y/%m/%d'), 0, 0.8*love.graphics.getHeight(), love.graphics.getWidth(), 'center');
end
return node