allow text to be typed while mouse hovers over drawing
[?]
May 17, 2022, 5:30 AM
IHG5RXP5IZCDP5N4L3BHD4J6GB2MTU4FVLTKZR6EQW7HCGBSJL2ACDependencies
- [2]
VVXVV2D2change data model; text can now have metadata - [3]
RJGZD4INbinary search to most natural up/down with proportional fonts - [4]
TNTYISW6rename - [5]
6LJZN727handle chords - [6]
OFA3PRBSautosave on keystrokes - [7]
ZD63LJ2Tbugfix: keep the click to create a new drawing from creating a new shape in the drawing - [8]
IYW7X3WLleft/right cursor movement, deleting characters - [9]
H7OEU6WPexperimental approach to combining keyboard and mouse while drawing - [10]
TEIKBO2Tdon't try to append text to drawings - [*]
OTIBCAUJlove2d scaffold
Change contents
- edit in main.lua at line 493
if mouse_in_drawing() then return end - edit in main.lua at line 767[3.493]→[3.42:70](∅→∅),[3.70]→[3.515:603](∅→∅),[3.515]→[3.515:603](∅→∅),[3.603]→[2.3017:3055](∅→∅),[2.3055]→[3.795:894](∅→∅),[3.640]→[3.795:894](∅→∅),[3.894]→[3.739:803](∅→∅),[3.739]→[3.739:803](∅→∅)
function mouse_in_drawing()local x, y = love.mouse.getX(), love.mouse.getY()for _,drawing in ipairs(lines) doif drawing.mode == 'drawing' thenif y >= drawing.y and y < drawing.y + pixels(drawing.h) and x >= 16 and x < 16+drawingw thenreturn trueendendendreturn falseend