Skip to content

Commit 8d1bf6e

Browse files
authored
Rename the strikethrough example to strikethrough_and_underline (#21689)
# Objective Rename the example, fix a typo in its ("it's") comments.
1 parent 0067171 commit 8d1bf6e

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3561,13 +3561,13 @@ category = "UI (User Interface)"
35613561
wasm = true
35623562

35633563
[[example]]
3564-
name = "strikethrough"
3565-
path = "examples/ui/strikethrough.rs"
3564+
name = "strikethrough_and_underline"
3565+
path = "examples/ui/strikethrough_and_underline.rs"
35663566
doc-scrape-examples = true
35673567

3568-
[package.metadata.example.strikethrough]
3569-
name = "Strikethrough"
3570-
description = "Demonstrates how to display text with strikethrough."
3568+
[package.metadata.example.strikethrough_and_underline]
3569+
name = "Strikethrough and Underline"
3570+
description = "Demonstrates how to display text with strikethrough and underline."
35713571
category = "UI (User Interface)"
35723572
wasm = true
35733573

examples/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ Example | Description
570570
[Stacked Gradients](../examples/ui/stacked_gradients.rs) | An example demonstrating stacked gradients
571571
[Standard Widgets](../examples/ui/standard_widgets.rs) | Demonstrates use of core (headless) widgets in Bevy UI
572572
[Standard Widgets (w/Observers)](../examples/ui/standard_widgets_observers.rs) | Demonstrates use of core (headless) widgets in Bevy UI, with Observers
573-
[Strikethrough](../examples/ui/strikethrough.rs) | Demonstrates how to display text with strikethrough.
573+
[Strikethrough and Underline](../examples/ui/strikethrough_and_underline.rs) | Demonstrates how to display text with strikethrough and underline.
574574
[Tab Navigation](../examples/ui/tab_navigation.rs) | Demonstration of Tab Navigation between UI elements
575575
[Text](../examples/ui/text.rs) | Illustrates creating and updating text
576576
[Text Background Colors](../examples/ui/text_background_colors.rs) | Demonstrates text background colors

examples/ui/strikethrough.rs renamed to examples/ui/strikethrough_and_underline.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! This example illustrates UI text with strikethrough
1+
//! This example illustrates UI text with strikethrough and underline decorations
22
33
use bevy::{
44
color::palettes::css::{GREEN, NAVY, RED, YELLOW},
@@ -16,7 +16,7 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
1616
commands.spawn(Camera2d);
1717
commands.spawn((
1818
Text::new("struck\nstruck"),
19-
// Just add the `Strikethrough` component to any `Text`, `Text2d` or `TextSpan` and it's text will be struck through.
19+
// Just add the `Strikethrough` component to any `Text`, `Text2d` or `TextSpan` and its text will be struck through
2020
Strikethrough,
2121
TextFont {
2222
font: asset_server.load("fonts/FiraSans-Bold.ttf"),
@@ -49,6 +49,7 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
4949
StrikethroughColor(RED.into()),
5050
TextBackgroundColor(GREEN.into()),
5151
),
52+
// Text entities with the `Underline` component will drawn with underline
5253
(Text::new("underline"), Underline),
5354
(
5455
Text::new("struck"),

0 commit comments

Comments
 (0)