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

Add multitouch support in EguiMq and demo.rs #60

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

edwar4rd
Copy link

One should add

if phase == mq::TouchPhase::Started {
            self.mouse_button_down_event(ctx, mq::MouseButton::Left, x, y);
        }

        if phase == mq::TouchPhase::Ended {
            self.mouse_button_up_event(ctx, mq::MouseButton::Left, x, y);
        }

        if phase == mq::TouchPhase::Moved {
            self.mouse_motion_event(ctx, x, y);
        }

in their touch event event handler

One should add
```
if phase == mq::TouchPhase::Started {
            self.mouse_button_down_event(ctx, mq::MouseButton::Left, x, y);
        }

        if phase == mq::TouchPhase::Ended {
            self.mouse_button_up_event(ctx, mq::MouseButton::Left, x, y);
        }

        if phase == mq::TouchPhase::Moved {
            self.mouse_motion_event(ctx, x, y);
        }
```
in their touch event event handle
Comment on lines +147 to +157
if phase == mq::TouchPhase::Started {
self.mouse_button_down_event(ctx, mq::MouseButton::Left, x, y);
}

if phase == mq::TouchPhase::Ended {
self.mouse_button_up_event(ctx, mq::MouseButton::Left, x, y);
}

if phase == mq::TouchPhase::Moved {
self.mouse_motion_event(ctx, x, y);
}
Copy link
Sponsor Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be moved into EguiMq::touch_event to lessen the amount of code the user has to write

Copy link
Sponsor Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could also be a match phase

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants