ClientOS/installer/corclicky.lua
2025-10-20 00:19:13 +02:00

11 lines
378 B
Lua

while true do
local e = {os.pullEvent()}
if e[1] == "mouse_click" and e[3] >= self.x1 and e[4] >= self.y1 and e[3] <= self.x2 and e[4] <= self.y2 then
self.oldcolor = self.color
self.color = self.border.color
elseif e[1] == "mouse_up" and self.oldcolor then
self.color = self.oldcolor
self.oldcolor = nil
end
self.render()
end