Skip to content

Commit

Permalink
UI Display and Visibility Example (#7629)
Browse files Browse the repository at this point in the history
# Objective

An example demonstrating how Display and Visibility work in Bevy UI.

fixes #5380
related #5368

![Bevy App 15_02_2023
20_40_46](https://user-images.githubusercontent.com/27962798/219150865-419ade53-250b-4030-8197-907cac7aa5da.png)

## Changelog

* Added the example `flex_display.rs`.
  • Loading branch information
ickshonpe authored Jun 19, 2023
1 parent b4fa833 commit 50c50cd
Show file tree
Hide file tree
Showing 3 changed files with 506 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1792,6 +1792,16 @@ description = "Illustrates creating and updating a button"
category = "UI (User Interface)"
wasm = true

[[example]]
name = "display_and_visibility"
path = "examples/ui/display_and_visibility.rs"

[package.metadata.example.display_and_visibility]
name = "Display and Visibility"
description = "Demonstrates how Display and Visibility work in the UI."
category = "UI (User Interface)"
wasm = true

[[example]]
name = "window_fallthrough"
path = "examples/ui/window_fallthrough.rs"
Expand Down
1 change: 1 addition & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ Example | Description
[Borders](../examples/ui/borders.rs) | Demonstrates how to create a node with a border
[Button](../examples/ui/button.rs) | Illustrates creating and updating a button
[CSS Grid](../examples/ui/grid.rs) | An example for CSS Grid layout
[Display and Visibility](../examples/ui/display_and_visibility.rs) | Demonstrates how Display and Visibility work in the UI.
[Flex Layout](../examples/ui/flex_layout.rs) | Demonstrates how the AlignItems and JustifyContent properties can be composed to layout nodes and position text
[Font Atlas Debug](../examples/ui/font_atlas_debug.rs) | Illustrates how FontAtlases are populated (used to optimize text rendering internally)
[Overflow](../examples/ui/overflow.rs) | Simple example demonstrating overflow behavior
Expand Down
Loading

0 comments on commit 50c50cd

Please sign in to comment.