allow text to be typed while mouse hovers over drawing

[?]
May 17, 2022, 5:30 AM
IHG5RXP5IZCDP5N4L3BHD4J6GB2MTU4FVLTKZR6EQW7HCGBSJL2AC

Dependencies

  • [2] VVXVV2D2 change data model; text can now have metadata
  • [3] RJGZD4IN binary search to most natural up/down with proportional fonts
  • [4] TNTYISW6 rename
  • [5] 6LJZN727 handle chords
  • [6] OFA3PRBS autosave on keystrokes
  • [7] ZD63LJ2T bugfix: keep the click to create a new drawing from creating a new shape in the drawing
  • [8] IYW7X3WL left/right cursor movement, deleting characters
  • [9] H7OEU6WP experimental approach to combining keyboard and mouse while drawing
  • [10] TEIKBO2T don't try to append text to drawings
  • [*] OTIBCAUJ love2d scaffold

Change contents

  • edit in main.lua at line 493
    [3.47][3.1:41]()
    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) do
    if drawing.mode == 'drawing' then
    if y >= drawing.y and y < drawing.y + pixels(drawing.h) and x >= 16 and x < 16+drawingw then
    return true
    end
    end
    end
    return false
    end