Merge pull request #2815 from edwloef/extend-mouse-interactions
add more missing mouse interactions
This commit is contained in:
commit
23723f8624
2 changed files with 30 additions and 16 deletions
|
|
@ -6,21 +6,28 @@ pub enum Interaction {
|
|||
None,
|
||||
Hidden,
|
||||
Idle,
|
||||
ContextMenu,
|
||||
Help,
|
||||
Pointer,
|
||||
Grab,
|
||||
Text,
|
||||
Progress,
|
||||
Wait,
|
||||
Cell,
|
||||
Crosshair,
|
||||
Working,
|
||||
Text,
|
||||
Alias,
|
||||
Copy,
|
||||
Move,
|
||||
NoDrop,
|
||||
NotAllowed,
|
||||
Grab,
|
||||
Grabbing,
|
||||
ResizingHorizontally,
|
||||
ResizingVertically,
|
||||
ResizingDiagonallyUp,
|
||||
ResizingDiagonallyDown,
|
||||
NotAllowed,
|
||||
ResizingColumn,
|
||||
ResizingRow,
|
||||
AllScroll,
|
||||
ZoomIn,
|
||||
ZoomOut,
|
||||
Cell,
|
||||
Move,
|
||||
Copy,
|
||||
Help,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -487,12 +487,21 @@ pub fn mouse_interaction(
|
|||
Interaction::None | Interaction::Idle => {
|
||||
winit::window::CursorIcon::Default
|
||||
}
|
||||
Interaction::ContextMenu => winit::window::CursorIcon::ContextMenu,
|
||||
Interaction::Help => winit::window::CursorIcon::Help,
|
||||
Interaction::Pointer => winit::window::CursorIcon::Pointer,
|
||||
Interaction::Working => winit::window::CursorIcon::Progress,
|
||||
Interaction::Grab => winit::window::CursorIcon::Grab,
|
||||
Interaction::Grabbing => winit::window::CursorIcon::Grabbing,
|
||||
Interaction::Progress => winit::window::CursorIcon::Progress,
|
||||
Interaction::Wait => winit::window::CursorIcon::Wait,
|
||||
Interaction::Cell => winit::window::CursorIcon::Cell,
|
||||
Interaction::Crosshair => winit::window::CursorIcon::Crosshair,
|
||||
Interaction::Text => winit::window::CursorIcon::Text,
|
||||
Interaction::Alias => winit::window::CursorIcon::Alias,
|
||||
Interaction::Copy => winit::window::CursorIcon::Copy,
|
||||
Interaction::Move => winit::window::CursorIcon::Move,
|
||||
Interaction::NoDrop => winit::window::CursorIcon::NoDrop,
|
||||
Interaction::NotAllowed => winit::window::CursorIcon::NotAllowed,
|
||||
Interaction::Grab => winit::window::CursorIcon::Grab,
|
||||
Interaction::Grabbing => winit::window::CursorIcon::Grabbing,
|
||||
Interaction::ResizingHorizontally => {
|
||||
winit::window::CursorIcon::EwResize
|
||||
}
|
||||
|
|
@ -503,13 +512,11 @@ pub fn mouse_interaction(
|
|||
Interaction::ResizingDiagonallyDown => {
|
||||
winit::window::CursorIcon::NwseResize
|
||||
}
|
||||
Interaction::NotAllowed => winit::window::CursorIcon::NotAllowed,
|
||||
Interaction::ResizingColumn => winit::window::CursorIcon::ColResize,
|
||||
Interaction::ResizingRow => winit::window::CursorIcon::RowResize,
|
||||
Interaction::AllScroll => winit::window::CursorIcon::AllScroll,
|
||||
Interaction::ZoomIn => winit::window::CursorIcon::ZoomIn,
|
||||
Interaction::ZoomOut => winit::window::CursorIcon::ZoomOut,
|
||||
Interaction::Cell => winit::window::CursorIcon::Cell,
|
||||
Interaction::Move => winit::window::CursorIcon::Move,
|
||||
Interaction::Copy => winit::window::CursorIcon::Copy,
|
||||
Interaction::Help => winit::window::CursorIcon::Help,
|
||||
};
|
||||
|
||||
Some(icon)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue