Skip to content

Conversation

@rudderbucky
Copy link
Contributor

Objective

Fixes #21801 and tweaks the feathers example to exhibit the new behavior.

Solution

What the issue suggested. Added a new resource and adjusted the EntityCursor interaction logic in cursor.rs.

Testing

Tested it via the example tweak where the wide button now toggles the override logic.
(Note: I wasn't able to get the load cursor to show up on macOS, but I think this is a winit issue: cursor busyButClickableCursor appears to be invalid)

None => None,
})
.unwrap_or(&r_default_cursor.0);
let cursor = override_cursor
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can happen before the above expression to skip the iteration with an unwrap_or_else

/// This is meant for cases like loading where you don't want the cursor to imply you
/// can interact with something.
#[derive(Resource, Debug, Clone, Default, Reflect)]
pub struct OverrideCursor(pub Option<SystemCursorIcon>);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets add derive Deref to this so we can skip the .0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Need a way to override EntityCursor

2 participants