|
@@ -1,8 +1,9 @@
|
|
|
-gl.setup(800,600)
|
|
|
|
|
|
|
+--gl.setup(800,600)
|
|
|
|
|
+gl.setup(1024,768)
|
|
|
|
|
|
|
|
local json = require "json"
|
|
local json = require "json"
|
|
|
local font = resource.load_font("silkscreen.ttf")
|
|
local font = resource.load_font("silkscreen.ttf")
|
|
|
-local cur_image = resource.load_image("/home/david/git/especificos-node/node/1.png")
|
|
|
|
|
|
|
+local cur_image = resource.load_image("/home/pi/especificos-node/node/1.png")
|
|
|
local state = "diapo"
|
|
local state = "diapo"
|
|
|
local cur_preg = ""
|
|
local cur_preg = ""
|
|
|
local time = "0:0"
|
|
local time = "0:0"
|
|
@@ -34,9 +35,10 @@ end
|
|
|
node.event("data", decode_command) -- listen to UDP
|
|
node.event("data", decode_command) -- listen to UDP
|
|
|
function node.render()
|
|
function node.render()
|
|
|
if state == "diapo" then
|
|
if state == "diapo" then
|
|
|
- cur_image:draw(0,0,WIDTH,HEIGHT)
|
|
|
|
|
- font:write(730,580,time,20,1,1,1,1)
|
|
|
|
|
- font:write(10,580,img_prog,20,1,1,1,1)
|
|
|
|
|
|
|
+ --cur_image:draw(0,0,WIDTH,HEIGHT)
|
|
|
|
|
+ util.draw_correct(image, 0, 0, WIDTH, HEIGHT)
|
|
|
|
|
+ font:write(WIDTH-70,HEIGHT-20,time,20,1,1,1,1)
|
|
|
|
|
+ font:write(10,HEIGHT-20,img_prog,20,1,1,1,1)
|
|
|
elseif state == "pregunta" then
|
|
elseif state == "pregunta" then
|
|
|
preguntas:draw(0,0,WIDTH,HEIGHT)
|
|
preguntas:draw(0,0,WIDTH,HEIGHT)
|
|
|
font:write(120,320,cur_preg,20,1,1,1,1)
|
|
font:write(120,320,cur_preg,20,1,1,1,1)
|