[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,
|
ResizeNwSe,
|
||||||
ResizeVertical,
|
ResizeVertical,
|
||||||
Text,
|
Text,
|
||||||
|
/// Used when moving
|
||||||
|
Grab,
|
||||||
|
Grabbing,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for CursorIcon {
|
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::ResizeNwSe => glutin::window::CursorIcon::NwseResize,
|
||||||
CursorIcon::ResizeVertical => glutin::window::CursorIcon::NsResize,
|
CursorIcon::ResizeVertical => glutin::window::CursorIcon::NsResize,
|
||||||
CursorIcon::Text => glutin::window::CursorIcon::Text,
|
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",
|
ResizeNwSe => "nwse-resize",
|
||||||
ResizeVertical => "ns-resize",
|
ResizeVertical => "ns-resize",
|
||||||
Text => "text",
|
Text => "text",
|
||||||
|
Grab => "grab",
|
||||||
|
Grabbing => "grabbing",
|
||||||
// "no-drop"
|
// "no-drop"
|
||||||
// "not-allowed"
|
// "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