Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic multi touch support (issue #279) #306

Merged
merged 36 commits into from
May 6, 2021
Merged

Basic multi touch support (issue #279) #306

merged 36 commits into from
May 6, 2021

Commits on Apr 13, 2021

  1. translate touch events from glium to egui

    Unfortunately, winit does not seem to create _Touch_ events for the touch pad
    on my mac.  Only _TouchpadPressure_ events are sent.
    
    Found some issues (like
    [this](rust-windowing/winit#54)), but I am not sure
    what they exactly mean:  Sometimes, touch events are mixed with
    touch-to-pointer translation in the discussions.
    quadruple-output committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    3cae7c5 View commit details
    Browse the repository at this point in the history
  2. translate touch events from web_sys to egui

    The are a few open topics:
    - egui_web currently translates touch events into pointer events.
      I guess this should change, such that egui itself performs this kind of
      conversion.
    - `pub fn egui_web::pos_from_touch_event` is a public function, but I
      would like to change the return type to an `Option`.  Shouldn't this
      function be private, anyway?
    quadruple-output committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    9dbda04 View commit details
    Browse the repository at this point in the history
  3. introduce TouchState and Gesture

    InputState.touch was introduced with type `TouchState`, just as
    InputState.pointer is of type `Pointer`.
    
    The TouchState internally relies on a collection of `Gesture`s.  This commit
    provides the first rudimentary implementation of a Gesture, but has no
    functionality, yet.
    quadruple-output committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    7c1c01a View commit details
    Browse the repository at this point in the history
  4. add method InputState::zoom()

    So far, the method always returns `None`, but it should work as soon as the
    `Zoom` gesture is implemented.
    quadruple-output committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    69dafcc View commit details
    Browse the repository at this point in the history
  5. manage one TouchState per individual device

    Although quite unlikely, it is still possible to connect more than one touch
    device. (I have three touch pads connected to my MacBook in total, but
    unfortunately `winit` sends touch events for none of them.)
    
    We do not want to mix-up the touches from different devices.
    quadruple-output committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    7d30aa1 View commit details
    Browse the repository at this point in the history
  6. implement control loop for gesture detection

    The basic idea is that each gesture can focus on detection logic and does not
    have to care (too much) about managing touch state in general.
    quadruple-output committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    2d8406b View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    c2908ab View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    a5da37d View commit details
    Browse the repository at this point in the history
  9. fix failing doctest

    a simple `TODO` should be enough
    quadruple-output committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    45e59e7 View commit details
    Browse the repository at this point in the history

Commits on Apr 17, 2021

  1. Configuration menu
    Copy the full SHA
    c348c6c View commit details
    Browse the repository at this point in the history
  2. get rid of Gestures

    quadruple-output committed Apr 17, 2021
    Configuration menu
    Copy the full SHA
    9e841d5 View commit details
    Browse the repository at this point in the history

Commits on Apr 18, 2021

  1. Provide a Zoom/Rotate window in the demo app

    For now, it works for two fingers only.  The third finger interrupts the
    gesture.
    
    Bugs:
    - Pinching in the demo window also moves the window -> Pointer events must be
      ignored when touch is active
    - Pinching also works when doing it outside the demo window -> it would be nice
      to return the touch info in the `Response` of the painter allocation
    quadruple-output committed Apr 18, 2021
    Configuration menu
    Copy the full SHA
    dfc4f20 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    286e4d5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    39d93e1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    99176c3 View commit details
    Browse the repository at this point in the history

Commits on Apr 21, 2021

  1. Configuration menu
    Copy the full SHA
    de4b4cd View commit details
    Browse the repository at this point in the history

Commits on Apr 22, 2021

  1. Configuration menu
    Copy the full SHA
    211972e View commit details
    Browse the repository at this point in the history

Commits on Apr 23, 2021

  1. support more than two fingers

    This commit includes an improved Demo Window for egui_demo, and a complete
    re-write of the gesture detection.  The PR should be ready for review, soon.
    quadruple-output committed Apr 23, 2021
    Configuration menu
    Copy the full SHA
    ca846e5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0882300 View commit details
    Browse the repository at this point in the history

Commits on Apr 26, 2021

  1. Configuration menu
    Copy the full SHA
    0d7d20a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bd5b909 View commit details
    Browse the repository at this point in the history

Commits on Apr 28, 2021

  1. Configuration menu
    Copy the full SHA
    cc054b8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fee8ed8 View commit details
    Browse the repository at this point in the history

Commits on Apr 29, 2021

  1. Configuration menu
    Copy the full SHA
    0687b82 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ce8f3a8 View commit details
    Browse the repository at this point in the history
  3. accept suggestion #306 (comment)

    Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
    quadruple-output and emilk committed Apr 29, 2021
    Configuration menu
    Copy the full SHA
    9c6c6b1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    5c27120 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    612069a View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    e3cc56e View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    e4c9a65 View commit details
    Browse the repository at this point in the history

Commits on May 1, 2021

  1. Configuration menu
    Copy the full SHA
    67b5a88 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3918653 View commit details
    Browse the repository at this point in the history

Commits on May 3, 2021

  1. Configuration menu
    Copy the full SHA
    9161b12 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b38e225 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    acbefda View commit details
    Browse the repository at this point in the history

Commits on May 5, 2021

  1. Configuration menu
    Copy the full SHA
    755ca30 View commit details
    Browse the repository at this point in the history