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§

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 additional cuicui_layout components.

Structs§

Plugin
Plugin managing position and size of bevy_sprite renderable components using cuicui_layout components.
RootBundle
Create a Root container as the screen root, its size will dyamically follow the size of the viewport of camera marked iwth LayoutRootCamera.
UiCameraBundle
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 the LayoutRootCamera’s viewport size, whenever it changes.
update_layout_transform
Set the Transforms according to LayoutRect’s computed from cuicui_layout.