UI Extraction filtering #9561
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
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 anextract_sdf_text_uinodes
function to the extract schedule that queries for the text components and anSdfText
marker component. But this won't work as theextract_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 wrapsText
and reimplement all the text systems with queries forSdfText
instead ofText
, 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
andImageBundle
would haveExtractUiNode
andExtractUiNodeBorder
components, andTextBundle
would also have anExtractUiNodeText
, etc.The text was updated successfully, but these errors were encountered: