viridia / quill_v1

Reactive UI framework for Bevy game engine
MIT License
60 stars 7 forks source link

Option to parent to a manually-constructed UI #5

Open viridia opened 9 months ago

viridia commented 9 months ago

Currently when you create a Quill root presenter, it has no parent node, which means that a UI root as well. However, there will probably be use cases where it would be desirable to attach a Quill UI to an existing Bevy UI that is manually constructed.

There are a couple ways this could work. One would be an option on the ViewHandle:

commands.spawn(ViewHandle::new(ui_main, ()).with_parent(parent_entity));

Another option would be to make it a View combinator like .insert() or .styled().