From cdc18ee886205ecf64964206caf0cc46e7506134 Mon Sep 17 00:00:00 2001 From: Rich Churcher Date: Fri, 8 Nov 2024 09:57:45 +1300 Subject: [PATCH] Move UI example to testbed (#16241) # Objective UI example is quite extensive, probably not the best teaching example anymore. Closes #16230. --- .github/workflows/validation-jobs.yml | 2 +- Cargo.toml | 18 +++++++----------- examples/README.md | 1 - examples/{ui => testbed}/ui.rs | 0 4 files changed, 8 insertions(+), 13 deletions(-) rename examples/{ui => testbed}/ui.rs (100%) diff --git a/.github/workflows/validation-jobs.yml b/.github/workflows/validation-jobs.yml index ba79f4c834..424177e37d 100644 --- a/.github/workflows/validation-jobs.yml +++ b/.github/workflows/validation-jobs.yml @@ -244,7 +244,7 @@ jobs: - name: First Wasm build run: | - cargo build --release --example ui --target wasm32-unknown-unknown + cargo build --release --example testbed_ui --target wasm32-unknown-unknown - name: Run examples shell: bash diff --git a/Cargo.toml b/Cargo.toml index 9e1ea7c57d..fd5de2a1f7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3136,17 +3136,6 @@ description = "Demonstrates how to control the relative depth (z-position) of UI category = "UI (User Interface)" wasm = true -[[example]] -name = "ui" -path = "examples/ui/ui.rs" -doc-scrape-examples = true - -[package.metadata.example.ui] -name = "UI" -description = "Illustrates various features of Bevy UI" -category = "UI (User Interface)" -wasm = true - [[example]] name = "ui_scaling" path = "examples/ui/ui_scaling.rs" @@ -3857,6 +3846,13 @@ doc-scrape-examples = true [package.metadata.example.testbed_3d] hidden = true +[[example]] +name = "testbed_ui" +path = "examples/testbed/ui.rs" +doc-scrape-examples = true + +[package.metadata.example.testbed_ui] +hidden = true [[example]] name = "testbed_ui_layout_rounding" diff --git a/examples/README.md b/examples/README.md index 3b6359ad71..903cb82746 100644 --- a/examples/README.md +++ b/examples/README.md @@ -516,7 +516,6 @@ Example | Description [Text Debug](../examples/ui/text_debug.rs) | An example for debugging text layout [Text Wrap Debug](../examples/ui/text_wrap_debug.rs) | Demonstrates text wrapping [Transparency UI](../examples/ui/transparency_ui.rs) | Demonstrates transparency for UI -[UI](../examples/ui/ui.rs) | Illustrates various features of Bevy UI [UI Material](../examples/ui/ui_material.rs) | Demonstrates creating and using custom Ui materials [UI Scaling](../examples/ui/ui_scaling.rs) | Illustrates how to scale the UI [UI Texture Atlas](../examples/ui/ui_texture_atlas.rs) | Illustrates how to use TextureAtlases in UI diff --git a/examples/ui/ui.rs b/examples/testbed/ui.rs similarity index 100% rename from examples/ui/ui.rs rename to examples/testbed/ui.rs