Crate bevy::ui

Expand description

This crate contains Bevy’s UI system, which can be used to create UI for both 2D and 3D games

§Basic usage

Spawn UI elements with node_bundles::ButtonBundle, node_bundles::ImageBundle, node_bundles::TextBundle and node_bundles::NodeBundle This UI is laid out with the Flexbox and CSS Grid layout models (see https://cssreference.io/flexbox/)

Modules§

Structs§

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.
  • A type to serve as Taffy’s node context (which allows the content size of leaf nodes to be computed)
  • The type of UI node. This is used to determine how to render the UI node.
  • 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 and MaterialNodeBundle to spawn entities that are rendered with a specific UiMaterial type. They serve as an easy to use high level way to render Node entities with custom shader logic.

Functions§

Type Aliases§