Crate bevy_cobweb_ui
source ·Expand description
§Bevy Cobweb UI
This crate is under development.
Tools and widgets for building UI with bevy_cobweb
.
This crate features simple, easy, code-driven UI for small-to-medium-scale games. UI layout/configuration can be specified in asset files, which can be hot-reloaded or edited from a UI editor (TODO) to support efficient fine-tuning in live apps.
§bevy
compatability
bevy | bevy_cobweb_ui |
---|---|
0.13 | 0.0.1 - master |
Modules§
Structs§
- Adds systems that emit events that UI nodes might react to.
CobwebStyle
primitive for adding basic images.CobwebStyle
primitive for creating single-color rectangular blocks.- Marker component for UI nodes.
- Tracks UI nodes that need layout updates this tick.
- Stores a fully-specified reference to a style.
- A
UiInstruction
for adding a UI root node within a specific camera’s viewport. SystemSet
containing layout systems that run immediately beforeTransformPropagate
, which updatesGlobalTransforms
.SystemSet
containing systems that prepare the UI tree for layout computation.- Component added to nodes that load
T
from the stylesheet. - Entity event sent by
UiCommands::build
to a node after its instructions are built. - Reactive component that records the 2D dimensions of a node as a rectangle on the plane of the node’s parent.
- A helper struct for creating
OnEvent
UI instructions. - A
UiInstruction
for adding a reactor to keyboard inputs to a UI node. - A
UiInstruction
for adding a UI node within a specific parent node. - Represents the position of a rectangle within another rectangle.
- Component with the size reference of the root ancestor of a node.
- Reactive component with the size reference for computing the layout of a node.
- Represents the path to a stylesheet file in the
asset
directory. - Represents the path to a specific style in a stylesheet file.
- Represents a complete reference to a style instance in a stylesheet asset.
- Reactive resource for managing styles loaded from stylesheet assets.
- Bundle for creating a 2D camera as a UI root node.
- Bundle for setting up a camera as a UI root node.
- Wrapper around
EntityCommands
for UI nodes being constructed. - A system event sent to UI event reactors added to UI nodes with
On::<E>::new()
. - Component for UI root entities.
- Component that controls the z-order of nodes relative to their siblings on the same parent.
Enums§
- Represents a transformation between two rectangles.
- A
CobwebStyle
that wrapsPosition
with simple justification-based settings. - Expresses the positioning reference of one axis of a node within another node.
- Reactive component that controls how
SizeRefs
are derived during layout computation. - Possible errors that can be produced by the internal
StyleAssetLoader
.
Constants§
- The depth of root-level UI nodes tied to a camera, relative to the camera.
- The token that separates parts of a style path.
- Z-increment used for ordering UI nodes relative to their parents.
Traits§
- Trait representing
UiInstructions
that can be loaded withStyleSheet
. - Helper trait for creating
StyleLoaders
. - Extends
App
with methods supportingStyleSheet
use. - Helper trait for applying a UI instruction to a node entity.
- Helper trait for building UI nodes with
UiCommands
.
Functions§
- Despawns the
token
’s reactor whennode
is despawned.