Expand description
Make cuicui_layout useable with bevy’s 2D renderer (bevy_sprite).
Import this crate’s SpriteDsl and use cuicui_dsl::dsl! with
it to have a fully working UI library.
Note that unlike cuicui_layout_bevy_ui, this uses a Y axis down
coordinate space, (like bevy_sprite)
Therefore, if you happen to convert your layouts from bevy_ui to bevy_sprite
(or vis-versa) what was on top will be at the bottom and vis-versa.
This might be changed in the future, so beware!
Re-exports§
pub use dsl::SpriteDsl;
Modules§
- content_
sized - Systems to update a
cuicui_layout::Node’s size based on a sprite’s and text’s size, rather that fixed at spawn time. - dsl
- Bundles wrapping
bevy::spritebundles with additionalcuicui_layoutcomponents.
Structs§
- Plugin
- Plugin managing position and size of
bevy_spriterenderable components usingcuicui_layoutcomponents. - Root
Bundle - Create a
Rootcontainer as the screen root, its size will dyamically follow the size of the viewport of camera marked iwthLayoutRootCamera. - UiCamera
Bundle - Camera which screen boundaries are used as the size of the
ScreenRootlayout root.
Functions§
- set_
added_ layout_ camera_ root - System setting the size of newly added
ScreenRootnodes. - update_
layout_ camera_ root - System updating the
ScreenRootcuicui_layoutNodewith theLayoutRootCamera’s viewport size, whenever it changes. - update_
layout_ transform - Set the
Transforms according toLayoutRect’s computed fromcuicui_layout.