20 lines
640 B
Lua
20 lines
640 B
Lua
|
local node = Node:extend('nodes.time', {})
|
||
|
|
||
|
local textFont = love.graphics.newFont('fonts/Lato-Thin.ttf', 400)
|
||
|
local smallFont = love.graphics.newFont('fonts/Lato-Light.ttf', 60)
|
||
|
|
||
|
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, 255, 255 )
|
||
|
|
||
|
love.graphics.setFont(textFont);
|
||
|
love.graphics.printf(os.date('%H:%M'), 0, 100, love.graphics.getWidth(), 'center');
|
||
|
|
||
|
love.graphics.setFont(smallFont);
|
||
|
love.graphics.printf(os.date('%Y/%m/%d'), 0, 575, love.graphics.getWidth(), 'center');
|
||
|
end
|
||
|
|
||
|
return node
|