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

UI Extraction filtering #9561

Open
ickshonpe opened this issue Aug 24, 2023 · 0 comments
Open

UI Extraction filtering #9561

ickshonpe opened this issue Aug 24, 2023 · 0 comments
Labels
A-Rendering Drawing game state to the screen A-UI Graphical user interfaces, styles, layouts, and widgets C-Feature A new feature, making something new possible

Comments

@ickshonpe
Copy link
Contributor

ickshonpe commented Aug 24, 2023

What problem does this solve or what need does it fill?

At the moment if you add a custom UI extraction function there is no way to disable the built-in extraction, so you have to create new components and systems as well.

For example, imagine you want to create an SdfTextPlugin that renders text using SDFs. A naive implementation would add an extract_sdf_text_uinodes function to the extract schedule that queries for the text components and an SdfText marker component. But this won't work as the extract_text_uinodes function will find the same text components and the text will be extracted and rendered twice.

Instead, you would need to make SdfText into a newtype that wraps Text and reimplement all the text systems with queries for SdfText instead of Text, replicating hundreds of lines of code.

What solution would you like?

Add marker components to all the UI node bundles that the extraction functions can filter on.
Nodebundle and ImageBundle would have ExtractUiNode and ExtractUiNodeBorder components, and TextBundle would also have an ExtractUiNodeText, etc.

@ickshonpe ickshonpe added C-Feature A new feature, making something new possible S-Needs-Triage This issue needs to be labelled labels Aug 24, 2023
@alice-i-cecile alice-i-cecile added C-Feature A new feature, making something new possible A-Rendering Drawing game state to the screen A-UI Graphical user interfaces, styles, layouts, and widgets and removed C-Feature A new feature, making something new possible S-Needs-Triage This issue needs to be labelled labels Aug 25, 2023
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-Feature A new feature, making something new possible
Projects
None yet
Development

No branches or pull requests

2 participants