experiment: only show drawing borders when they can be edited

This commit is contained in:
Kartik K. Agaram 2022-05-15 14:45:23 -07:00
parent 65cea736c3
commit 4158eee7f6
1 changed files with 6 additions and 2 deletions

View File

@ -88,8 +88,12 @@ function love.draw()
-- line drawing
line.y = y
y = y+pixels(line.h)
love.graphics.setColor(0.75,0.75,0.75)
love.graphics.rectangle('line', 16,line.y, drawingw,pixels(line.h))
local pmx,pmy = love.mouse.getX(), love.mouse.getY()
if pmx > 16 and pmx < 16+drawingw and pmy > line.y and pmy < line.y+pixels(line.h) then
love.graphics.setColor(0.75,0.75,0.75)
love.graphics.rectangle('line', 16,line.y, drawingw,pixels(line.h))
end
local mx,my = coord(love.mouse.getX()-16), coord(love.mouse.getY()-line.y)