- Ja es pot triar tile a l'editor

This commit is contained in:
2023-01-27 20:00:53 +01:00
parent 2d82e95373
commit 9467d72fbb

View File

@@ -42,6 +42,30 @@ editor={
editor.paused=true
editor.show_menu()
end
if btnp(KEY_TAB) then
update=editor.update_tileset
end
end
end,
update_tileset=function()
cls()
sspr(0,0,128,128,0,0)
local mx,my=mousex(),mousey()
local tx,ty=mx>>3,my>>3
local rx,ry=tx<<3,ty<<3
rect(rx-1, ry-1, rx+8, ry+8, 10)
if btnp(KEY_TAB) or btnp(KEY_ESCAPE) then
update=editor.update
end
if mbtnp(1) then
if tx<16 and ty<16 then
editor.selected_tile=ty*16+tx
end
update=editor.update
end
end,