wire up touch handlers

akkartik
Dec 26, 2023, 5:24 PM
7EJUTFDQWBND3YBVQLWKNZQEYVIRRK4PTCRN2S2OUGKASXE3BWYAC

Dependencies

Change contents

  • edit in reference.md at line 90
    [5.3780]
    [5.3780]
    * `on.touch_press(x,y, dx,dy, pressure)` -- called when you touch a
    multi-touch screen. Provides in `x` and `y` the point on the screen at which
    the touch occurred.
    (Based on [LÖVE](https://love2d.org/wiki/love.touchpressed).)
  • edit in reference.md at line 96
    [5.3781]
    [3.2270]
    * `on.touch_release(x,y, dx,dy, pressure)` -- called when you release a touch.
    Provides the same arguments as `on.touch_press()` above.
    (Based on [LÖVE](https://love2d.org/wiki/love.touchreleased).)
    * `on.touch_move(x,y, dx,dy, pressure)` -- called when you move any finger on
    a multi-touch screen. Provides the same arguments as `on.touch_press()`
    above, with `dx` and `dy` containing the amount moved since the previous
    call to `touch_move`.
    (Based on [LÖVE](https://love2d.org/wiki/love.touchmoved).)
  • edit in main.lua at line 201
    [2.71]
    [7.165]
    end
    function App.touchpressed(x,y, dx,dy, pressure)
    if Mode == 'error' then return end
    Cursor_time = 0 -- ensure cursor is visible immediately after it moves
    if on.touch_press then on.touch_press(x,y, dx,dy, pressure) end
    end
    function App.touchreleased(x,y, dx,dy, pressure)
    if Mode == 'error' then return end
    Cursor_time = 0 -- ensure cursor is visible immediately after it moves
    if on.touch_release then on.touch_release(x,y, dx,dy, pressure) end
    end
    function App.touchmoved(x,y, dx,dy, pressure)
    if on.touch_move then on.touch_move(x,y, dx,dy, pressure) end
  • edit in 0001-on at line 16
    [2.449]
    [9.444]
    -- on.touch_press (see love.touchpressed)
    -- on.touch_release (see love.touchreleased)
    -- on.touch_move (see love.touchmoved)