Skip to content

Conversation

@amedoeyes
Copy link
Contributor

Objective

Solution

  • Added EntityCursor re-insertion in set_*_colors functions with corresponding cursor shape depending on whether the widget is disabled or not.

Testing

  • Tested the changes in the feathers example.

@amedoeyes
Copy link
Contributor Author

I think function names should change because they don't just change colors anymore.

@alice-i-cecile alice-i-cecile requested a review from viridia August 13, 2025 16:55
@alice-i-cecile alice-i-cecile added C-Feature A new feature, making something new possible A-UI Graphical user interfaces, styles, layouts, and widgets M-Release-Note Work that should be called out in the blog due to impact labels Aug 13, 2025
@github-actions
Copy link
Contributor

It looks like your PR has been selected for a highlight in the next release blog post, but you didn't provide a release note.

Please review the instructions for writing release notes, then expand or revise the content in the release notes directory to showcase your changes.

@alice-i-cecile
Copy link
Member

I think function names should change because they don't just change colors anymore.

I agree, can you update this? Can you also add this PR to the feathers release notes?

@alice-i-cecile alice-i-cecile added S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged X-Uncontroversial This work is generally agreed upon D-Straightforward Simple bug fixes and API improvements, docs, test and examples labels Aug 13, 2025
Comment on lines +186 to +189
let cursor_shape = match disabled {
true => bevy_window::SystemCursorIcon::NotAllowed,
false => bevy_window::SystemCursorIcon::Pointer,
};
Copy link
Contributor

Choose a reason for hiding this comment

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

It's not a problem to match on a bool I guess, but it's not idiomatic and looks a bit odd:

Suggested change
let cursor_shape = match disabled {
true => bevy_window::SystemCursorIcon::NotAllowed,
false => bevy_window::SystemCursorIcon::Pointer,
};
let cursor_shape = if disabled {
bevy_window::SystemCursorIcon::NotAllowed
} else {
bevy_window::SystemCursorIcon::Pointer
};

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree, but I saw that it was already done like that in other parts of the crate so for consistency I just followed it.

Copy link
Contributor

@ickshonpe ickshonpe left a comment

Choose a reason for hiding this comment

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

Changes look good to me.

@alice-i-cecile alice-i-cecile added this to the 0.17 milestone Aug 13, 2025
@amedoeyes
Copy link
Contributor Author

I think function names should change because they don't just change colors anymore.

I agree, can you update this? Can you also add this PR to the feathers release notes?

On it.

@amedoeyes
Copy link
Contributor Author

Is this good?

@alice-i-cecile alice-i-cecile added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged labels Aug 14, 2025
@alice-i-cecile
Copy link
Member

Thanks! Nice work :)

@alice-i-cecile alice-i-cecile added this pull request to the merge queue Aug 14, 2025
Merged via the queue into bevyengine:main with commit bd06771 Aug 14, 2025
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-UI Graphical user interfaces, styles, layouts, and widgets C-Feature A new feature, making something new possible D-Straightforward Simple bug fixes and API improvements, docs, test and examples M-Release-Note Work that should be called out in the blog due to impact S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it X-Uncontroversial This work is generally agreed upon

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feathers: Cursors for disabled widgets

4 participants