Skip to content
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

Split up the bevy_ui::render module #9217

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ickshonpe
Copy link
Contributor

@ickshonpe ickshonpe commented Jul 20, 2023

Objective

The size and mixed-up responsibilities of the bevy_ui::render module makes the UI renderer difficult to understand.

Solution

Split up the bevy_ui::render module so that it is only responsible for setting up the render app. Move the rest of the code into new extract, prepare and queue modules.


Changelog

bevy_ui::render

  • Added extract, prepare and queue modules.
  • mod.rs contains the render app setup.
  • ExtractedUiNode, ExtractedUiNodes, extract_uinodes, extract_atlas_uinodes, extract_uinode_borders and extract_text_uinodes are moved to the extract module.
  • prepare_uinodes, UiVertex and UiBatchare moved to theprepare` module.
  • queue_uinodes is moved to the queue module.

Migration Guide

extract, prepare and queue modules have been added to bevy_ui::render.

  • ExtractedUiNode, ExtractedUiNodes, extract_uinodes, extract_atlas_uinodes, extract_uinode_borders and extract_text_uinodes have been moved to the extract module.
  • prepare_uinodes, UiVertex and UiBatchhave been moved to theprepare` module.
  • queue_uinodes has been moved to the queue module.

The size and mixed up responsibilities of `bevy_ui::render::mod.rs` file makes the UI renderer difficult to understand.

This commit splits up mod.rs so that it only contains the code responsible for setting up the render app and moves the rest into new extraction, prepare and queue modules.
@alice-i-cecile alice-i-cecile added A-Rendering Drawing game state to the screen A-UI Graphical user interfaces, styles, layouts, and widgets C-Code-Quality A section of code that is hard to understand or change labels Jul 21, 2023
@JMS55 JMS55 added this to the 0.13 milestone Nov 23, 2023
@alice-i-cecile alice-i-cecile removed this from the 0.13 milestone Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen A-UI Graphical user interfaces, styles, layouts, and widgets C-Code-Quality A section of code that is hard to understand or change
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants