2026-06-05 06:53:15 +00:00
|
|
|
-- ctrl+shift+b for launching game
|
|
|
|
|
|
2026-05-21 00:49:54 +00:00
|
|
|
local ui = require("editor.ui")
|
|
|
|
|
|
|
|
|
|
function love.load()
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
2026-05-27 00:05:56 +00:00
|
|
|
function love.textinput(t)
|
|
|
|
|
ui.textinput_char(t)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function love.keypressed(key)
|
|
|
|
|
if key == "backspace" then
|
|
|
|
|
ui.textinput_backspace()
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
2026-05-21 00:49:54 +00:00
|
|
|
function love.update(dt)
|
2026-05-22 01:59:46 +00:00
|
|
|
|
2026-05-21 00:49:54 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function love.draw()
|
2026-06-05 06:53:15 +00:00
|
|
|
ui.panel(50, 50, 50, 50)
|
|
|
|
|
|
|
|
|
|
ui.button(100, 200, 100, 100, "hello world", function()
|
|
|
|
|
print("clicked!")
|
|
|
|
|
end)
|
|
|
|
|
|
|
|
|
|
ui.textInput(50, 400, 100, 100, "textInput")
|
|
|
|
|
ui.button(200,200,100,100, "test", function ()
|
|
|
|
|
print("below")
|
|
|
|
|
end)
|
|
|
|
|
ui.button(200,250,100,100, "test2", function ()
|
|
|
|
|
print("on top")
|
|
|
|
|
end)
|
2026-05-24 01:56:00 +00:00
|
|
|
|
2026-06-05 06:53:15 +00:00
|
|
|
ui.process() -- hit test + draw
|
|
|
|
|
ui.flush() -- reset input state
|
2026-05-21 00:49:54 +00:00
|
|
|
end
|