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::sprite
bundles with additionalcuicui_layout
components.
Structs§
- Plugin
- Plugin managing position and size of
bevy_sprite
renderable components usingcuicui_layout
components. - Root
Bundle - Create a
Root
container 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
ScreenRoot
layout root.
Functions§
- set_
added_ layout_ camera_ root - System setting the size of newly added
ScreenRoot
nodes. - update_
layout_ camera_ root - System updating the
ScreenRoot
cuicui_layout
Node
with theLayoutRootCamera
’s viewport size, whenever it changes. - update_
layout_ transform - Set the
Transform
s according toLayoutRect
’s computed fromcuicui_layout
.