- [NEW] Claus i portes funcionant

This commit is contained in:
2026-03-09 13:46:51 +01:00
parent f2a52570b1
commit 12b322ab6b
15 changed files with 203 additions and 36 deletions

View File

@@ -299,9 +299,13 @@ editor = {
local mx, my = mouse.pos()
local x,y = 0,0
for i,k in pairs(items) do
local w = math.max(k.visual.w, #k.name*4)
local w = math.max(k.visual.w, #k.label*4)
if x+w > 160 then
y=y+32
x=0
end
local ox = (w-k.visual.w)/2
draw.text(k.name, x, y, 15)
draw.text(k.label, x, y, 15)
draw.surf(k.visual.x, k.visual.y, k.visual.w, k.visual.h, x+ox, y+7)
if mx>x and mx<x+w and my>y and my<y+7+k.visual.h then
draw.rect(x+ox, y+7, k.visual.w, k.visual.h, 28)