Crate cuicui_layout_bevy_sprite
source ·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
- Systems to update a
cuicui_layout::Node
’s size based on a sprite’s and text’s size, rather that fixed at spawn time. - Bundles wrapping [
bevy::sprite
] bundles with additionalcuicui_layout
components.
Structs
- Plugin managing position and size of
bevy_sprite
renderable components usingcuicui_layout
components. - Create a
Root
container as the screen root, its size will dyamically follow the size of the viewport of camera marked iwthLayoutRootCamera
. - Camera which screen boundaries are used as the size of the
ScreenRoot
layout root.
Functions
- System setting the size of newly added
ScreenRoot
nodes. - System updating the
ScreenRoot
cuicui_layout
Node
with theLayoutRootCamera
’s viewport size, whenever it changes.