keypadOS/src/main.lua
2024-08-17 22:48:09 +00:00

30 lines
600 B
Lua

pinLabel = main:addLabel()
:setText("")
:setFontSize(1)
enterButton = main:addButton()
:setText(">>>>")
:setBackground(colors.blue)
:setPosition(6,3)
:setSize(1.5,3.2)
:onClick(unlockDoor)
for i = 1, 9 do
local button = main:addButton()
:setPosition(btnX,btnY)
:setText(tostring(i))
:setSize(2,1)
:onClick(
function()
addToPin(i)
end)
btnX = btnX + 2
if btnX >= 6 then
btnY = btnY + 1
btnX = 1
end
end
parallel.waitForAll(basalt.autoUpdate, updateChecker)