no input recogniced by urutora
I followed the instructions and it draws what i tell it to draw but then there is no input, I'm unable to interact with the UI elements. I'm running LOVE 11.4 (Mysterious Mysteries)
local urutora = require 'urutora' local u
function love.mousepressed(x, y) u:pressed(x, y) end function love.mousemoved(x, y, dx, dy) u:moved(x, y, dx, dy) end function love.mousereleased(x, y) u:released(x, y) end function love.textinput(text) u:textinput(text) end function love.keypressed(k, scancode, isrepeat) u:keypressed(k, scancode, isrepeat) end function love.wheelmoved(x, y) u:wheelmoved(x, y) end
function love.update(dt) u:update(dt) end function love.draw() u:draw() end
function love.load() u = urutora:new()
local Text = u.text({ text = 'Click me!', x = 10, y = 10, w = 200, })
u:add(Text) end
the documentation is actually wrong, the input glue code is supposed to be
function love.mousepressed(x, y, button) u:pressed(x, y, button) end
function love.mousemoved(x, y, dx, dy) u:moved(x, y, dx, dy) end
function love.mousereleased(x, y, button) u:released(x, y, button) end
function love.textinput(text) u:textinput(text) end
function love.keypressed(k, scancode, isrepeat) u:keypressed(k, scancode, isrepeat) end
function love.wheelmoved(x, y) u:wheelmoved(x, y) end
they are checking if its the left button pressed, nil is not the left button. yikes!
now it works