Open TheDudeFromCI opened 8 months ago
Interesting point. You mean skip entirely a descendant component, like add SkipStyling
(temp name), or partial skip, like SkipProperties(Vec<String>)
, which contains a list of properties to not react to changes?
There are three levels of skipping that I can think of:
I would imagine the third option to be most useful in the case of directly editing properties, as one would know which properties they plan on overwriting. Although, I can see the practicality of all three.
Due to the nature of interactive elements in a user interface, some properties of an entity must be overwritten dynamically. An example of this might be a scroll pane overwriting the
top
field of it'sStyle
component to shift the content panel within up and down.As the current change listener for
bevy_ecss
listens for all component changes, it will always trigger a change when this this field within theStyle
component and thus triggering the CSS to be reapplied. (See #53)A possible solution to this would be to allow for a new component that can be added to an entity that would contain a list of properties to blacklist the change listener for. Any changes to these properties would be ignored.
This is just a performance enhancement, but is something worth considering with entities that needed to be updated extremely frequently.