From 9aa3e5ea508e814893999a6b07715bb17b9285e2 Mon Sep 17 00:00:00 2001 From: Talin Date: Thu, 17 Jul 2025 13:08:14 -0700 Subject: [PATCH] Apply naming suggestion. --- crates/bevy_feathers/src/cursor.rs | 8 ++++---- crates/bevy_feathers/src/lib.rs | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/bevy_feathers/src/cursor.rs b/crates/bevy_feathers/src/cursor.rs index 8c154521f8..2b542af74d 100644 --- a/crates/bevy_feathers/src/cursor.rs +++ b/crates/bevy_feathers/src/cursor.rs @@ -19,7 +19,7 @@ use bevy_winit::cursor::CustomCursor; /// A resource that specifies the cursor icon to be used when the mouse is not hovering over /// any other entity. This is used to set the default cursor icon for the window. #[derive(Resource, Debug, Clone, Default)] -pub struct DefaultEntityCursor(pub EntityCursor); +pub struct DefaultCursor(pub EntityCursor); /// A component that specifies the cursor shape to be used when the pointer hovers over an entity. /// This is copied to the windows's [`CursorIcon`] component. @@ -76,7 +76,7 @@ pub(crate) fn update_cursor( parent_query: Query<&ChildOf>, cursor_query: Query<&EntityCursor>, mut q_windows: Query<(Entity, &mut Window, Option<&CursorIcon>)>, - r_default_cursor: Res, + r_default_cursor: Res, ) { let cursor = hover_map.and_then(|hover_map| match hover_map.get(&PointerId::Mouse) { Some(hover_set) => hover_set.keys().find_map(|entity| { @@ -115,8 +115,8 @@ pub struct CursorIconPlugin; impl Plugin for CursorIconPlugin { fn build(&self, app: &mut App) { - if app.world().get_resource::().is_none() { - app.init_resource::(); + if app.world().get_resource::().is_none() { + app.init_resource::(); } app.add_systems(PreUpdate, update_cursor.in_set(PickingSystems::Last)); } diff --git a/crates/bevy_feathers/src/lib.rs b/crates/bevy_feathers/src/lib.rs index 95594182cd..11f2d0f488 100644 --- a/crates/bevy_feathers/src/lib.rs +++ b/crates/bevy_feathers/src/lib.rs @@ -25,7 +25,7 @@ use bevy_text::{TextColor, TextFont}; use crate::{ controls::ControlsPlugin, - cursor::{CursorIconPlugin, DefaultEntityCursor, EntityCursor}, + cursor::{CursorIconPlugin, DefaultCursor, EntityCursor}, theme::{ThemedText, UiTheme}, }; @@ -60,7 +60,7 @@ impl Plugin for FeathersPlugin { HierarchyPropagatePlugin::>::default(), )); - app.insert_resource(DefaultEntityCursor(EntityCursor::System( + app.insert_resource(DefaultCursor(EntityCursor::System( bevy_window::SystemCursorIcon::Default, )));