use available variables

[?]
Jul 13, 2022, 3:19 PM
BXYVMS4A4FLFWTMBI3UHGL6NY6LDAQVBYYQVLWZJ4IMALK6UKPOQC

Dependencies

  • [2] P5QNVXSN drop final mention of state global beyond main.lua
  • [3] RT6EV6OP delegate update events to drawings
  • [4] UHB4GARJ left/right margin -> left/right coordinates
  • [5] LF7BWEG4 group all editor globals
  • [6] LAW2O3NW extract variable Margin_left
  • [7] KTZQ57HV replace globals with args in a few functions
  • [8] EHSUSZMK more idiomatic variable names
  • [9] PJEQCTBL add state arg to Drawing.update
  • [10] DRFE3B3Z mouse buttons are integers, not strings
  • [11] JFFUF5AL override mouse state lookups in tests
  • [*] BLWAYPKV extract a module

Change contents

  • replacement in drawing.lua at line 248
    [3.433][2.1306:1464]()
    table.insert(drawing.pending.points, {x=Drawing.coord(App.mouse_x()-State.left, State.width), y=Drawing.coord(App.mouse_y()-drawing.y, State.width)})
    [3.433]
    [3.565]
    table.insert(drawing.pending.points, {x=Drawing.coord(pmx-State.left, State.width), y=Drawing.coord(pmy-drawing.y, State.width)})