don't show padding when collisions won't happen
Also don't show the undo hint when we're in the undo zone. Now things look unchanged when we're in the undo zone. Relax, nothing will change.
This commit is contained in:
parent
4492336866
commit
688884d06c
|
@ -7,10 +7,6 @@ on.draw = function()
|
|||
end
|
||||
-- some hacky stuff outside of LuaML
|
||||
if Move then
|
||||
-- a hint for original location of node, to help put it back
|
||||
App.color{r=0.8, g=0.8, b=0.8}
|
||||
love.graphics.rectangle('fill', vx(Move.oldx), vy(Move.oldy), scale(Move.node.w), scale(Move.node.h))
|
||||
-- a hint about the amount of padding we're going to clear when we set the node down
|
||||
draw_move_node_shadow()
|
||||
end
|
||||
for _,obj in ipairs(Surface) do
|
||||
|
|
|
@ -1,7 +1,14 @@
|
|||
draw_move_node_shadow = function()
|
||||
love.graphics.rectangle('fill',
|
||||
if dist(vx(Move.node.x), vy(Move.node.y), vx(Move.oldx), vy(Move.oldy)) > 10 then
|
||||
-- signal that a move will cause collisions
|
||||
App.color{r=0.8, g=0.8, b=0.8}
|
||||
love.graphics.rectangle('fill',
|
||||
vx(Move.node.pos.x-Move.node.hs.x),
|
||||
vy(Move.node.pos.y-Move.node.hs.y),
|
||||
scale(Move.node.hs.x*2),
|
||||
scale(Move.node.hs.y*2))
|
||||
|
||||
-- show original location of node, to help put it back
|
||||
love.graphics.rectangle('line', vx(Move.oldx), vy(Move.oldy), scale(Move.node.w), scale(Move.node.h))
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue