diff --git a/0026-on.draw b/0026-on.draw index f238b8c..6f9801b 100644 --- a/0026-on.draw +++ b/0026-on.draw @@ -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 diff --git a/0134-draw_move_node_shadow b/0134-draw_move_node_shadow index d55aa5a..72a5386 100644 --- a/0134-draw_move_node_shadow +++ b/0134-draw_move_node_shadow @@ -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 \ No newline at end of file