From 6dc71f6f3b1fbf5d0f027e815ccb041cd8e507ae Mon Sep 17 00:00:00 2001 From: Andy Terra <152812+airstrike@users.noreply.github.com> Date: Fri, 16 Aug 2024 10:44:58 -0400 Subject: [PATCH 1/3] Expose additional mouse interaction cursors --- core/src/mouse/interaction.rs | 5 +++++ winit/src/conversion.rs | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/core/src/mouse/interaction.rs b/core/src/mouse/interaction.rs index 065eb8e725..92842668cd 100644 --- a/core/src/mouse/interaction.rs +++ b/core/src/mouse/interaction.rs @@ -13,6 +13,11 @@ pub enum Interaction { Grabbing, ResizingHorizontally, ResizingVertically, + ResizingDiagonalUp, + ResizingDiagonalDown, NotAllowed, ZoomIn, + ZoomOut, + Cell, + Move, } diff --git a/winit/src/conversion.rs b/winit/src/conversion.rs index e88ff84d78..b974b3b93f 100644 --- a/winit/src/conversion.rs +++ b/winit/src/conversion.rs @@ -423,8 +423,17 @@ pub fn mouse_interaction( winit::window::CursorIcon::EwResize } Interaction::ResizingVertically => winit::window::CursorIcon::NsResize, + Interaction::ResizingDiagonalUp => { + winit::window::CursorIcon::NeswResize + } + Interaction::ResizingDiagonalDown => { + winit::window::CursorIcon::NwseResize + } Interaction::NotAllowed => winit::window::CursorIcon::NotAllowed, Interaction::ZoomIn => winit::window::CursorIcon::ZoomIn, + Interaction::ZoomOut => winit::window::CursorIcon::ZoomOut, + Interaction::Cell => winit::window::CursorIcon::Cell, + Interaction::Move => winit::window::CursorIcon::Move, } } From 1cbedfaac702f16d098e2da2153e07e485780aff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ram=C3=B3n=20Jim=C3=A9nez?= Date: Fri, 13 Sep 2024 16:55:40 +0200 Subject: [PATCH 2/3] Rename `ResizingDiagonal*` to `ResizingDiagonally*` --- core/src/mouse/interaction.rs | 4 ++-- winit/src/conversion.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/mouse/interaction.rs b/core/src/mouse/interaction.rs index 92842668cd..9546c9c601 100644 --- a/core/src/mouse/interaction.rs +++ b/core/src/mouse/interaction.rs @@ -13,8 +13,8 @@ pub enum Interaction { Grabbing, ResizingHorizontally, ResizingVertically, - ResizingDiagonalUp, - ResizingDiagonalDown, + ResizingDiagonallyUp, + ResizingDiagonallyDown, NotAllowed, ZoomIn, ZoomOut, diff --git a/winit/src/conversion.rs b/winit/src/conversion.rs index b974b3b93f..d5eb9b9761 100644 --- a/winit/src/conversion.rs +++ b/winit/src/conversion.rs @@ -423,10 +423,10 @@ pub fn mouse_interaction( winit::window::CursorIcon::EwResize } Interaction::ResizingVertically => winit::window::CursorIcon::NsResize, - Interaction::ResizingDiagonalUp => { + Interaction::ResizingDiagonallyUp => { winit::window::CursorIcon::NeswResize } - Interaction::ResizingDiagonalDown => { + Interaction::ResizingDiagonallyDown => { winit::window::CursorIcon::NwseResize } Interaction::NotAllowed => winit::window::CursorIcon::NotAllowed, From d4b9b4720fee91e4a0d737b46acc1618e6fc6c42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ram=C3=B3n=20Jim=C3=A9nez?= Date: Fri, 13 Sep 2024 16:58:44 +0200 Subject: [PATCH 3/3] Add `Copy` and `Help` variants to `mouse::Interaction` --- core/src/mouse/interaction.rs | 2 ++ winit/src/conversion.rs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/core/src/mouse/interaction.rs b/core/src/mouse/interaction.rs index 9546c9c601..aad6a3ea93 100644 --- a/core/src/mouse/interaction.rs +++ b/core/src/mouse/interaction.rs @@ -20,4 +20,6 @@ pub enum Interaction { ZoomOut, Cell, Move, + Copy, + Help, } diff --git a/winit/src/conversion.rs b/winit/src/conversion.rs index d5eb9b9761..e762ae7c94 100644 --- a/winit/src/conversion.rs +++ b/winit/src/conversion.rs @@ -434,6 +434,8 @@ pub fn mouse_interaction( 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, } }