Split Input mouse event by ButtonState
This commit is contained in:
parent
e139aae143
commit
e55cd9652e
11 changed files with 180 additions and 203 deletions
|
|
@ -2,8 +2,7 @@
|
|||
use std::hash::Hash;
|
||||
|
||||
use crate::{
|
||||
input::{mouse, ButtonState},
|
||||
layout, row, text, Align, Clipboard, Element, Event, Hasher,
|
||||
input::mouse, layout, row, text, Align, Clipboard, Element, Event, Hasher,
|
||||
HorizontalAlignment, Layout, Length, Point, Rectangle, Row, Text,
|
||||
VerticalAlignment, Widget,
|
||||
};
|
||||
|
|
@ -152,10 +151,7 @@ where
|
|||
_clipboard: Option<&dyn Clipboard>,
|
||||
) {
|
||||
match event {
|
||||
Event::Mouse(mouse::Event::Input {
|
||||
button: mouse::Button::Left,
|
||||
state: ButtonState::Pressed,
|
||||
}) => {
|
||||
Event::Mouse(mouse::Event::ButtonPressed(mouse::Button::Left)) => {
|
||||
let mouse_over = layout.bounds().contains(cursor_position);
|
||||
|
||||
if mouse_over {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue