summaryrefslogtreecommitdiffstats
path: root/nodes
diff options
context:
space:
mode:
authorPiotr Dobrowolski <admin@tastycode.pl>2017-01-16 21:51:04 +0100
committerPiotr Dobrowolski <admin@tastycode.pl>2017-01-16 21:51:04 +0100
commita287845bf622e2669c42ba5261b1c86a2229b741 (patch)
tree46479bc6212df9ee8321f443705e1ae3286850da /nodes
parent30247ffb87bceca7a7fed8756fb1a1a9963c86a2 (diff)
downloadlove2d-signage-a287845bf622e2669c42ba5261b1c86a2229b741.tar.gz
love2d-signage-a287845bf622e2669c42ba5261b1c86a2229b741.tar.bz2
love2d-signage-a287845bf622e2669c42ba5261b1c86a2229b741.tar.xz
love2d-signage-a287845bf622e2669c42ba5261b1c86a2229b741.zip
Move screen resolution to config, make time node solution-flexible
- move screen resolution to config file - time node is more resolution-flexible
Diffstat (limited to 'nodes')
-rw-r--r--nodes/time.lua4
1 files changed, 2 insertions, 2 deletions
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