Unused code cleanup. Fixed slideshow config param.

master
Bartłomiej Wąs 2017-01-23 23:21:46 +01:00
parent be0408f78f
commit 615c9e5dee
2 changed files with 3 additions and 11 deletions

View File

@ -5,7 +5,7 @@ return {
nodes = {
{'nodes.newdash', displayTime=10},
{'nodes.misery', displayTime = 7},
{'nodes.slideshow', fileName='images/pig.png', displayTime=5},
{'nodes.slideshow', files={'images/pig.png'}, displayTime=5},
},
environment = os.getenv('ENV') or 'prod',
renderWidth = 1280,

View File

@ -9,13 +9,10 @@ local weatherFont = love.graphics.newFont('fonts/weathericons-regular-webfont.tt
local tempFont = love.graphics.newFont('fonts/Lato-Light.ttf', 120)
local timeFont = love.graphics.newFont('fonts/Lato-Thin.ttf', 330)
local dateFont = love.graphics.newFont('fonts/Lato-Light.ttf', 90)
local headerFont = love.graphics.newFont('fonts/Lato-Regular.ttf', 40)
local valueFont = love.graphics.newFont('fonts/Lato-Light.ttf', 45)
local atFont = love.graphics.newFont('fonts/Lato-Light.ttf', 35)
local textFont = love.graphics.newFont('fonts/Lato-Thin.ttf', 300)
local smallFont = love.graphics.newFont('fonts/Lato-Light.ttf', 30)
local weatherGlyphs = {
snow = "",
@ -26,15 +23,10 @@ local weatherGlyphs = {
drizzle = "",
}
local mockup = love.graphics.newImage("memes/new-dash-mockup.svg.png")
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, 100)
--love.graphics.draw(mockup, 0, 0)
if self.state then
love.graphics.setColor( 255, 255, 255 )
@ -42,7 +34,7 @@ function node:render()
love.graphics.setFont(weatherFont)
love.graphics.print(weatherGlyphs[self.state.weather], 100, 340)
else
love.graphics.setFont(smallFont)
love.graphics.setFont(atFont)
love.graphics.print(self.state.weather, 100, 370)
end
@ -62,7 +54,7 @@ function node:render()
end
love.graphics.printf("ON or OFF?", 900, 438, 400, 'left')
love.graphics.printf("ON or OFF?", 900, 498, 400, 'left')
--love.graphics.setFont(smallFont)
--love.graphics.setFont(atFont)
--love.graphics.printf(os.date("Last update: %Y/%m/%d %H:%M", self.state.lastUpdate), 0, love.graphics.getHeight() - 60, love.graphics.getWidth(), 'center')
--if self.state.insideTemperature then
-- love.graphics.printf("Room: " .. tostring(self.state.insideTemperature) .. "° / " .. tostring(self.state.insideHumidity) .. "%RH", 0, love.graphics.getHeight() - 100, love.graphics.getWidth(), 'center')