Skip to content

Conversation

ickshonpe
Copy link
Contributor

@ickshonpe ickshonpe commented Mar 17, 2023

Objective

many_buttons isn't a good benchmark in all cases because it draws so much text. Allow many_buttons to be run without text.

Solution

If the command-line flag no-text is specified, don't draw any text.

Changelog

  • many_buttons can now be run without text. To start without text run: cargo run --example many_buttons --release no-text

* `many_buttons` can now be run with the `bevy_text` feature disabled. Use
```cargo run --example many_buttons --no-default-features --features bevy_ui,bevy_sprite,bevy_render,bevy_core_pipeline,bevy_asset,bevy_winit```
@mockersf
Copy link
Member

Rather than rely on features, several other many_* examples accept command line parameters to change their behaviour.

Very simple flag like in

match std::env::args().nth(1).as_deref() {
Some("sphere") => {

@ickshonpe
Copy link
Contributor Author

ickshonpe commented Mar 17, 2023

I see, yes that's much simpler with commandline params. Changed it.

@ickshonpe ickshonpe changed the title Enable many_buttons to run without bevy_text Allow many_buttons to run with no text Mar 17, 2023
@ickshonpe ickshonpe changed the title Allow many_buttons to run with no text Allow many_buttons to be run without text Mar 17, 2023
@mockersf mockersf added C-Examples An addition or correction to our examples C-Performance A change motivated by improving speed, memory usage or compile times A-UI Graphical user interfaces, styles, layouts, and widgets labels Mar 17, 2023
@james7132 james7132 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 Mar 18, 2023
@mockersf mockersf added this pull request to the merge queue Mar 18, 2023
@mockersf mockersf merged commit 5703c75 into bevyengine:main Mar 18, 2023
ProfLander pushed a commit to shfty-rust/bevy that referenced this pull request Mar 19, 2023
ProfLander pushed a commit to shfty-rust/bevy that referenced this pull request Mar 19, 2023
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 C-Performance A change motivated by improving speed, memory usage or compile times 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.

3 participants