2017-01-12 21:16:52 +00:00
|
|
|
local node = Node:extend('nodes.time', {})
|
2017-01-08 00:11:19 +00:00
|
|
|
|
|
|
|
local textFont = love.graphics.newFont('fonts/Lato-Thin.ttf', 400)
|
2017-01-08 01:02:59 +00:00
|
|
|
local smallFont = love.graphics.newFont('fonts/Lato-Light.ttf', 60)
|
2017-01-08 00:11:19 +00:00
|
|
|
|
2017-01-12 21:16:52 +00:00
|
|
|
function node:render()
|
2017-01-08 00:11:19 +00:00
|
|
|
love.graphics.setColor( 0, 0, 0 )
|
|
|
|
love.graphics.rectangle("fill", 0, 0, love.graphics.getWidth(), love.graphics.getHeight())
|
|
|
|
|
|
|
|
love.graphics.setColor( 255, 255, 255 )
|
2017-01-08 01:02:59 +00:00
|
|
|
|
2017-01-08 00:11:19 +00:00
|
|
|
love.graphics.setFont(textFont);
|
2017-01-16 20:51:04 +00:00
|
|
|
love.graphics.printf(os.date('%H:%M'), 0, 0.14*love.graphics.getHeight(), love.graphics.getWidth(), 'center');
|
2017-01-08 01:02:59 +00:00
|
|
|
|
|
|
|
love.graphics.setFont(smallFont);
|
2017-01-16 20:51:04 +00:00
|
|
|
love.graphics.printf(os.date('%Y/%m/%d'), 0, 0.8*love.graphics.getHeight(), love.graphics.getWidth(), 'center');
|
2017-01-08 00:11:19 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
return node
|