Skip to content

Commit 7cd2a57

Browse files
author
Fernan Lukban
committed
Fixed failing doctest and updated some comments
1 parent 13d73fb commit 7cd2a57

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

crates/bevy_render/src/view/window/cursor.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ impl Plugin for CursorPlugin {
3737
#[derive(Component, Debug, Clone, Reflect, PartialEq, Eq)]
3838
#[reflect(Component, Debug, Default, PartialEq)]
3939
pub enum CursorIcon {
40+
/// Makes the cursor hidden
4041
Hidden,
4142
/// Custom cursor image.
4243
Custom(CustomCursor),

crates/bevy_winit/src/state.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ pub struct CustomCursorCache(pub HashMap<CustomCursorCacheKey, winit::window::Cu
149149
/// A source for a cursor. Is created in `bevy_render` and consumed by the winit event loop.
150150
#[derive(Debug)]
151151
pub enum CursorSource {
152-
/// Cursor was set to hidden, so we need to pass this onto the winit_window
152+
/// A hidden cursor, used to hide the cursor in `winit_window`
153153
Hidden,
154154
/// A custom cursor was identified to be cached, no reason to recreate it.
155155
CustomCached(CustomCursorCacheKey),

examples/window/window_settings.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ struct CursorIcons(Vec<CursorIcon>);
166166

167167
fn init_cursor_icons(mut commands: Commands, asset_server: Res<AssetServer>) {
168168
commands.insert_resource(CursorIcons(vec![
169+
CursorIcon::Hidden,
169170
SystemCursorIcon::Default.into(),
170171
SystemCursorIcon::Pointer.into(),
171172
SystemCursorIcon::Wait.into(),

0 commit comments

Comments
 (0)