[drag-and-drop] Add Grab and Grabbing CursorIcon:s
This commit is contained in:
parent
c9c12f2d79
commit
ed8a69ab2f
3 changed files with 8 additions and 1 deletions
|
@ -36,6 +36,9 @@ pub enum CursorIcon {
|
|||
ResizeNwSe,
|
||||
ResizeVertical,
|
||||
Text,
|
||||
/// Used when moving
|
||||
Grab,
|
||||
Grabbing,
|
||||
}
|
||||
|
||||
impl Default for CursorIcon {
|
||||
|
|
|
@ -153,6 +153,8 @@ pub fn translate_cursor(cursor_icon: egui::CursorIcon) -> glutin::window::Cursor
|
|||
CursorIcon::ResizeNwSe => glutin::window::CursorIcon::NwseResize,
|
||||
CursorIcon::ResizeVertical => glutin::window::CursorIcon::NsResize,
|
||||
CursorIcon::Text => glutin::window::CursorIcon::Text,
|
||||
CursorIcon::Grab => glutin::window::CursorIcon::Grab,
|
||||
CursorIcon::Grabbing => glutin::window::CursorIcon::Grabbing,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -167,9 +167,11 @@ fn cursor_web_name(cursor: egui::CursorIcon) -> &'static str {
|
|||
ResizeNwSe => "nwse-resize",
|
||||
ResizeVertical => "ns-resize",
|
||||
Text => "text",
|
||||
Grab => "grab",
|
||||
Grabbing => "grabbing",
|
||||
// "no-drop"
|
||||
// "not-allowed"
|
||||
// default, help, pointer, progress, wait, cell, crosshair, text, alias, copy, move, grab, grabbing,
|
||||
// default, help, pointer, progress, wait, cell, crosshair, text, alias, copy, move
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue