Snapping mouse to grid
This commit is contained in:
parent
f765ec74ef
commit
74fdcd51f7
4 changed files with 29 additions and 11 deletions
4
line.lua
4
line.lua
|
@ -38,6 +38,10 @@ function Line:draw()
|
|||
love.graphics.circle( "fill", sx, sy, Config.linePointRadius )
|
||||
local ex, ey = self.endpoint:globalCoords()
|
||||
love.graphics.circle( "fill", ex, ey, Config.linePointRadius )
|
||||
if #self.points == 1 then
|
||||
love.graphics.setColor( Color.white )
|
||||
return
|
||||
end
|
||||
-- Draw line
|
||||
local points = {}
|
||||
for _, point in ipairs( self.points ) do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue