engine/main.lua

30 lines
546 B
Lua

local ui = require("editor.ui")
function love.load()
end
function love.textinput(t)
ui.textinput_char(t)
end
function love.keypressed(key)
if key == "backspace" then
ui.textinput_backspace()
end
end
function love.update(dt)
end
function love.draw()
ui.panel(50,50,50,50)
ui.button(100,200,100,100,"hello world")
if ui.on("hello world") then -- detect if the button is pressed.
ui.panel(250,250,100,100)
end
ui.textInput(50,400,100,100,"textInput")
ui.flush() -- KEEP AT END
end