summaryrefslogtreecommitdiffstats
path: root/screens/screen1.lua
diff options
context:
space:
mode:
authorPiotr Dobrowolski <admin@tastycode.pl>2017-01-08 01:11:19 +0100
committerPiotr Dobrowolski <admin@tastycode.pl>2017-01-08 01:11:19 +0100
commitecb46842ae699f189580e2c12db548811549575f (patch)
tree634575b0a71e1f5eb70b47290cda894949805165 /screens/screen1.lua
parent590af22cd8a4c696924cf33536ae0611be04728c (diff)
downloadlove2d-signage-ecb46842ae699f189580e2c12db548811549575f.tar.gz
love2d-signage-ecb46842ae699f189580e2c12db548811549575f.tar.bz2
love2d-signage-ecb46842ae699f189580e2c12db548811549575f.tar.xz
love2d-signage-ecb46842ae699f189580e2c12db548811549575f.zip
Add weather and time screen
Diffstat (limited to 'screens/screen1.lua')
-rw-r--r--screens/screen1.lua20
1 files changed, 12 insertions, 8 deletions
diff --git a/screens/screen1.lua b/screens/screen1.lua
index 71f8fd4..8a62628 100644
--- a/screens/screen1.lua
+++ b/screens/screen1.lua
@@ -1,15 +1,19 @@
local node = {}
-function node.render()
-love.graphics.setColor( 0, 80, 0 )
-love.graphics.rectangle("fill", 0, 0, love.graphics.getWidth(), love.graphics.getHeight())
-love.graphics.setColor(255, 255, 255, 255)
-love.graphics.setNewFont(60)
+function node.load()
+end
-love.graphics.printf("Welcome to Warsaw Hackerspace\nextreme digital signage technology!", 0, love.graphics.getHeight()/2 - 30, love.graphics.getWidth(), 'center')
+function node.render()
+ love.graphics.setColor( 0, 0, 0 )
+ love.graphics.rectangle("fill", 0, 0, love.graphics.getWidth(), love.graphics.getHeight())
-love.graphics.setColor(255, 0, 0)
-love.graphics.circle("fill", 20, 300, 50)
+ for x = 0, love.graphics.getWidth() / 50, 1 do
+ for y = 0, love.graphics.getHeight() / 50, 1 do
+ local r = math.sin(x + love.timer.getTime() * 2) + math.cos(y + love.timer.getTime() * math.sin(x));
+ love.graphics.setColor(255, 255, 255, (r + 2) * 255)
+ love.graphics.circle("line", x * 50, y * 50, r * 10)
+ end
+ end
end
function node.update(dt)