Skip to content

Commit 50c50cd

Browse files
authored
UI Display and Visibility Example (#7629)
# 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`.
1 parent b4fa833 commit 50c50cd

File tree

3 files changed

+506
-0
lines changed

3 files changed

+506
-0
lines changed

Cargo.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1792,6 +1792,16 @@ description = "Illustrates creating and updating a button"
17921792
category = "UI (User Interface)"
17931793
wasm = true
17941794

1795+
[[example]]
1796+
name = "display_and_visibility"
1797+
path = "examples/ui/display_and_visibility.rs"
1798+
1799+
[package.metadata.example.display_and_visibility]
1800+
name = "Display and Visibility"
1801+
description = "Demonstrates how Display and Visibility work in the UI."
1802+
category = "UI (User Interface)"
1803+
wasm = true
1804+
17951805
[[example]]
17961806
name = "window_fallthrough"
17971807
path = "examples/ui/window_fallthrough.rs"

examples/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,7 @@ Example | Description
339339
[Borders](../examples/ui/borders.rs) | Demonstrates how to create a node with a border
340340
[Button](../examples/ui/button.rs) | Illustrates creating and updating a button
341341
[CSS Grid](../examples/ui/grid.rs) | An example for CSS Grid layout
342+
[Display and Visibility](../examples/ui/display_and_visibility.rs) | Demonstrates how Display and Visibility work in the UI.
342343
[Flex Layout](../examples/ui/flex_layout.rs) | Demonstrates how the AlignItems and JustifyContent properties can be composed to layout nodes and position text
343344
[Font Atlas Debug](../examples/ui/font_atlas_debug.rs) | Illustrates how FontAtlases are populated (used to optimize text rendering internally)
344345
[Overflow](../examples/ui/overflow.rs) | Simple example demonstrating overflow behavior

0 commit comments

Comments
 (0)