Turn Touch into a struct and add finger id
This commit is contained in:
parent
e19a07d400
commit
d3572e1b81
13 changed files with 151 additions and 112 deletions
|
|
@ -2,7 +2,7 @@
|
|||
use std::hash::Hash;
|
||||
|
||||
use crate::{
|
||||
input::{mouse, touch::Touch, ButtonState},
|
||||
input::{mouse, touch, ButtonState, Touch},
|
||||
layout, row, text, Align, Clipboard, Element, Event, Font, Hasher,
|
||||
HorizontalAlignment, Layout, Length, Point, Rectangle, Row, Text,
|
||||
VerticalAlignment, Widget,
|
||||
|
|
@ -156,7 +156,10 @@ where
|
|||
button: mouse::Button::Left,
|
||||
state: ButtonState::Pressed,
|
||||
})
|
||||
| Event::Touch(Touch::Started { .. }) => {
|
||||
| Event::Touch(Touch {
|
||||
phase: touch::Phase::Started,
|
||||
..
|
||||
}) => {
|
||||
let mouse_over = layout.bounds().contains(cursor_position);
|
||||
|
||||
if mouse_over {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue