-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Labels
A-UIGraphical user interfaces, styles, layouts, and widgetsGraphical user interfaces, styles, layouts, and widgetsC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behavior
Description
Apparently Text (docs) does not support multi line strings. Not sure if this is expected (but undocumented) behavior or a bug?
I simply made the following change to the examples/ui/text.rs example:
diff --git a/examples/ui/text.rs b/examples/ui/text.rs
index ecd7f081..c511ef38 100644
--- a/examples/ui/text.rs
+++ b/examples/ui/text.rs
@@ -17,7 +17,7 @@ fn text_update_system(diagnostics: Res<Diagnostics>, mut query: Query<&mut Text>
for mut text in &mut query.iter() {
if let Some(fps) = diagnostics.get(FrameTimeDiagnosticsPlugin::FPS) {
if let Some(average) = fps.average() {
- text.value = format!("FPS: {:.2}", average);
+ text.value = format!("FPS: {:.2}\nsecond line", average);
}
}
}Expected behavior: two lines of output
Metadata
Metadata
Assignees
Labels
A-UIGraphical user interfaces, styles, layouts, and widgetsGraphical user interfaces, styles, layouts, and widgetsC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behavior
