- [FIX] Les "formiguetes" en les seleccions no es veïen
- [FIX] El item seleccionat per a posar no es veia - [NEW] Al arrastrar un item, també te "formiguetes"
This commit is contained in:
@@ -17,15 +17,20 @@ editor = {
|
||||
|
||||
enable = function()
|
||||
app.update = editor.update
|
||||
sys.beat(2)
|
||||
sys.beat(5)
|
||||
shader.disable();
|
||||
pal.set(palfade.original)
|
||||
end,
|
||||
|
||||
update = function()
|
||||
if sys.beat() then
|
||||
editor.ants = (editor.ants<<12) | (editor.ants>>4)
|
||||
end
|
||||
|
||||
view.origin(0,0)
|
||||
surf.target(0)
|
||||
|
||||
-- Pintar fondo quadrejat, per si la capa background està oculta
|
||||
for y=0,104,8 do
|
||||
for x=0,160,8 do
|
||||
local color = (((x+y)//8)%2==0) and 23 or 16
|
||||
@@ -51,12 +56,10 @@ editor = {
|
||||
local rx1,ry1,rx2,ry2=editor.selection.x1<<3,editor.selection.y1<<3,editor.selection.x2<<3,editor.selection.y2<<3
|
||||
if rx1>rx2 then rx1,rx2=rx2,rx1 end
|
||||
if ry1>ry2 then ry1,ry2=ry2,ry1 end
|
||||
draw.mode(draw.PATTERN)
|
||||
draw.pattern(editor.ants)
|
||||
draw.rect(rx1-1, ry1-1, rx2-rx1+10, ry2-ry1+10, 28)
|
||||
draw.pattern(0xffff)
|
||||
if sys.beat() then
|
||||
editor.ants = (editor.ants<<12) | (editor.ants>>4)
|
||||
end
|
||||
draw.mode(draw.NORMAL)
|
||||
else
|
||||
draw.rect(mx-1, my-1, editor.brush.w*8+2, editor.brush.h*8+2, 28)
|
||||
draw.rect(mx, my, editor.brush.w*8, editor.brush.h*8, 1)
|
||||
@@ -121,6 +124,7 @@ editor = {
|
||||
end
|
||||
if editor.item_selected then
|
||||
local k = items[editor.item_selected]
|
||||
surf.source(surf_sprites)
|
||||
draw.surf(k.visual.x, k.visual.y, k.visual.w, k.visual.h, mx, my, k.visual.w, k.visual.h, editor.flip)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user