Skip to content

New cooldown example #19234

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
May 26, 2025
Merged

Conversation

NiklasEi
Copy link
Member

@NiklasEi NiklasEi commented May 16, 2025

Objective

We want to extend our examples with a new category "usage" to demonstrate common use cases (see bevyengine/bevy-website#2131). This PR adds an example of animated cooldowns on button clicks.

Solution

  • New example in "usage" directory
  • Implement a cooldown with an animated child Node

Testing

  • I ran this on Linux
  • test web (with bevy CLI: bevy run --example cooldown web --open)

Copy link
Contributor

The generated examples/README.md is out of sync with the example metadata in Cargo.toml or the example readme template. Please run cargo run -p build-templated-pages -- update examples to update it, and commit the file change.

@NiklasEi NiklasEi marked this pull request as ready for review May 16, 2025 14:17
@NiklasEi NiklasEi added C-Examples An addition or correction to our examples A-UI Graphical user interfaces, styles, layouts, and widgets labels May 16, 2025
@IQuick143 IQuick143 added the S-Needs-Review Needs reviewer attention (from anyone!) to move forward label May 17, 2025
Copy link
Member

@Vrixyz Vrixyz left a comment

Choose a reason for hiding this comment

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

A typo to be fixed, the rest is nitpicks so I'm approving

Copy link
Member

@mnmaita mnmaita left a comment

Choose a reason for hiding this comment

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

Great and concise example! I'm all in for this new section. Already wondering what other people will add to it. 😄

@NiklasEi NiklasEi 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-Needs-Review Needs reviewer attention (from anyone!) to move forward labels May 17, 2025
@NiklasEi NiklasEi requested a review from inodentry May 17, 2025 09:41
@NiklasEi NiklasEi removed the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label May 17, 2025
@Vrixyz Vrixyz mentioned this pull request May 17, 2025
2 tasks
Copy link
Contributor

@TimJentzsch TimJentzsch left a comment

Choose a reason for hiding this comment

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

Tested and works on the web!

I think a bit more documentation would be nice to make it easier to understand and use this example :)

@NiklasEi NiklasEi added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label May 17, 2025
Copy link
Contributor

@TimJentzsch TimJentzsch left a comment

Choose a reason for hiding this comment

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

Nicely done and quite useful!

@NiklasEi NiklasEi force-pushed the cooldown-usage-example branch from 57df750 to 5331b66 Compare May 17, 2025 13:29
@NiklasEi NiklasEi force-pushed the cooldown-usage-example branch from 7301c7f to 7a60c0c Compare May 17, 2025 20:10
@alice-i-cecile alice-i-cecile added this pull request to the merge queue May 26, 2025
@alice-i-cecile
Copy link
Member

Sensible approach, great example choice and a good level of complexity. I'm going to start merging these now, and #19279 can do a proper pass on organization as needed before 0.17.

Merged via the queue into bevyengine:main with commit 923c2ad May 26, 2025
67 of 72 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-Examples An addition or correction to our examples S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants