Inject measure funcs directly into UiSurface #17779
Labels
A-UI
Graphical user interfaces, styles, layouts, and widgets
C-Code-Quality
A section of code that is hard to understand or change
What problem does this solve or what need does it fill?
Atm we set measure funcs indirectly using the
ContentSize
component. If a new measure is required for some content the content's update system has to wrap the measure inside a NodeMeasure enum which is then wrapped inside an Option. Inui_system_layout
wetake
it out the option and pass it taffy which stores it in itsnode_context_data
slotmap. This seems unnecessarily overcomplicated.What solution would you like?
Instead the systems that update the measure funcs could just retrieve
UiSurface
and call itsupdate_node_context
method to inject the measure directly.The text was updated successfully, but these errors were encountered: