Expand description
User interface components and widgets.
Modules
- This module contains basic node bundles used to build UIs
- This module contains systems that update the UI when something changes
- This module contains the basic building blocks of Bevy’s UI
Structs
- The background color of the node
- The border color of the UI node.
- The calculated clip of the node
- A node with a
ContentSize
component is a node where its size is based on its content. - A
FixedMeasure
is aMeasure
that ignores all constraints and always returns the same size. - Represents the position of a grid item in a single axis.
- A
GridTrack
is a Row or Column of a CSS Grid. This struct specifies what size the track should be. See below for the different “track sizing functions” you can specify. - Marker used to identify default cameras, they will have priority over the
PrimaryWindow
camera. - Base component for a UI node, which also provides the computed size of the node.
- Main query for
ui_focus_system
- Automatically generated [
WorldQuery
] item type forNodeQuery
, returned when iterating over query results. - Automatically generated [
WorldQuery
] type for a read-only variant ofNodeQuery
. - Automatically generated [
WorldQuery
] item type forNodeQueryReadOnly
, returned when iterating over query results. - The
Outline
component adds an outline outside the edge of a UI node. Outlines do not take up space in the layout. - Whether to show or hide overflowing items
- A component storing the position of the mouse relative to the node, (0., 0.) being the top-left corner and (1., 1.) being the bottom-right If the mouse is not over the node, the value will go beyond the range of (0., 0.) to (1., 1.)
- Represents a possibly repeated
GridTrack
. - Describes the style of a UI container node
- Indicates that this root
Node
entity should be rendered to a specific camera. UI then will be layed out respecting the camera’s viewport and scale factor, and rendered to this camera’sbevy_render::camera::RenderTarget
. - The 2D texture displayed for this UI node
- Render pipeline data for a given
UiMaterial
- Adds the necessary ECS resources and render logic to enable rendering entities using the given
UiMaterial
asset type (which includesUiMaterial
types). - The basic plugin for Bevy UI
- A type which is commonly used to define margins, paddings and borders.
- The current scale of the UI.
- The current UI stack, which contains all UI nodes ordered by their depth (back-to-front).
Enums
- Used to control how items are distributed.
- Used to control how each individual item is aligned by default within the space they’re given.
- Used to control how the specified item is aligned within the space it’s given.
- The amount of space available to a node in a given axis https://www.w3.org/TR/css-sizing-3/#available
- Defines the text direction.
- Defines the layout model used by this node.
- Defines how flexbox items are ordered within a flexbox
- Defines if flexbox items appear on a single line or on multiple lines
- Describes whether the node should block interactions with lower nodes
- Controls whether grid items are placed row-wise or column-wise as well as whether the sparse or dense packing algorithm is used.
- Errors that occur when setting constraints for a
GridPlacement
- How many times to repeat a repeated grid track
- Describes what type of input interaction has occurred for a UI node.
- Used to control how items are distributed.
- Used to control how each individual item is aligned by default within the space they’re given.
- Used to control how the specified item is aligned within the space it’s given.
- Whether to show or hide overflowing items
- The strategy used to position this node
- The label enum labeling the types of systems in the Bevy UI
- Represents the possible value types for layout properties.
- Indicates that this
Node
entity’s front-to-back ordering is not controlled solely by its location in the UI hierarchy. A node with a higher z-index will appear on top of other nodes with a lower z-index.
Constants
Traits
- A
Measure
is used to compute the size of a ui node when the size of that node is based on its content. - Materials are used alongside
UiMaterialPlugin
andMaterialNodeBundle
to spawn entities that are rendered with a specificUiMaterial
type. They serve as an easy to use high level way to renderNode
entities with custom shader logic.
Functions
- Resolve and update the widths of Node outlines
- The system that sets Interaction for all UI elements based on the mouse cursor activity
- Updates the UI’s layout tree, computes the new layout geometry and then updates the sizes and transforms of all the UI nodes.