engine/main.lua

45 lines
937 B
Lua
Raw Permalink Normal View History

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")
2026-06-05 11:05:19 +00:00
local OBVIOUSYLYYYYY = 0
2026-05-21 00:49:54 +00:00
function love.load()
2026-06-05 11:05:19 +00:00
local imagedata = love.image.newImageData("durrrrrrrrrr.png")
print(imagedata)
love.window.setIcon(imagedata)
2026-05-21 00:49:54 +00:00
end
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-21 00:49:54 +00:00
end
function love.draw()
2026-06-05 06:53:15 +00:00
ui.panel(50, 50, 50, 50)
2026-06-05 11:05:19 +00:00
ui.button(100, 200, 100, 100, OBVIOUSYLYYYYY, function()
OBVIOUSYLYYYYY = OBVIOUSYLYYYYY + 1
print(OBVIOUSYLYYYYY)
2026-06-05 06:53:15 +00:00
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-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