More CI.
This commit is contained in:
parent
08b19fce59
commit
1c326a3db9
@ -39,10 +39,10 @@ pub enum EntityCursor {
|
|||||||
impl EntityCursor {
|
impl EntityCursor {
|
||||||
/// Convert the [`EntityCursor`] to a [`CursorIcon`] so that it can be inserted into a
|
/// Convert the [`EntityCursor`] to a [`CursorIcon`] so that it can be inserted into a
|
||||||
/// window.
|
/// window.
|
||||||
pub fn as_cursor_icon(&self) -> CursorIcon {
|
pub fn to_cursor_icon(&self) -> CursorIcon {
|
||||||
match self {
|
match self {
|
||||||
#[cfg(feature = "custom_cursor")]
|
#[cfg(feature = "custom_cursor")]
|
||||||
EntityCursor::Custom(custom_cursor) => CursorIcon::Custom(custom_cursor),
|
EntityCursor::Custom(custom_cursor) => CursorIcon::Custom(custom_cursor.clone()),
|
||||||
EntityCursor::System(icon) => CursorIcon::from(*icon),
|
EntityCursor::System(icon) => CursorIcon::from(*icon),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -100,11 +100,11 @@ pub(crate) fn update_cursor(
|
|||||||
}
|
}
|
||||||
windows_to_change.iter().for_each(|entity| {
|
windows_to_change.iter().for_each(|entity| {
|
||||||
if let Some(cursor) = cursor {
|
if let Some(cursor) = cursor {
|
||||||
commands.entity(*entity).insert(cursor.as_cursor_icon());
|
commands.entity(*entity).insert(cursor.to_cursor_icon());
|
||||||
} else {
|
} else {
|
||||||
commands
|
commands
|
||||||
.entity(*entity)
|
.entity(*entity)
|
||||||
.insert(r_default_cursor.0.as_cursor_icon());
|
.insert(r_default_cursor.0.to_cursor_icon());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user