bevy-ui-layout
Installation
SKILL.md
Bevy UI layout
When to use
Load this when laying out HUD or menu nodes. Text content stays on bevy-ui-text. Colors and widget styling stay on bevy-ui-theming.
ECS shape
- Nodes: spawn
Nodeentities. Children are child entities. Flexbox and CSS Grid are fields onNode. - Widgets:
ui_widgets::Buttonplus thePressedmarker for the held state.ImageNodefor a texture. Text content stays onbevy-ui-text. - Systems: layout is engine-owned. Game systems read
PressedandComputedNode. They do not run a second layout pass.
A column fills the window. The button is a child with a fixed size. BackgroundColor is the fill. BorderRadius rounds the control.
use bevy::ui_widgets::Button;