From 8ec4b99a6917379acfe1e50a3c1f4119504d7ffe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois?= Date: Wed, 26 Apr 2023 21:52:31 +0200 Subject: [PATCH] standardize instructions in examples (#8478) # Objective - Standardize on screen instructions in examples: - top left, bottom left when better - white, black when better - same margin (12px) and font size (20) ## Solution - Started with a few examples, let's reach consensus then document and open issues for the rest --- examples/3d/3d_gizmos.rs | 24 +++++--- examples/3d/anti_aliasing.rs | 5 +- examples/3d/atmospheric_fog.rs | 6 +- examples/3d/bloom_3d.rs | 7 ++- examples/3d/fog.rs | 27 ++++---- examples/3d/lighting.rs | 17 ++++++ examples/3d/parallax_mapping.rs | 11 ++-- examples/3d/shadow_biases.rs | 105 +++++++++++++++++++------------- 8 files changed, 123 insertions(+), 79 deletions(-) diff --git a/examples/3d/3d_gizmos.rs b/examples/3d/3d_gizmos.rs index 7ae97cd49d..585df5718d 100644 --- a/examples/3d/3d_gizmos.rs +++ b/examples/3d/3d_gizmos.rs @@ -43,15 +43,23 @@ fn setup( transform: Transform::from_xyz(4.0, 8.0, 4.0), ..default() }); - // text - commands.spawn(TextBundle::from_section( - "Press 't' to toggle drawing gizmos on top of everything else in the scene", - TextStyle { - font_size: 24., - color: Color::WHITE, + + // example instructions + commands.spawn( + TextBundle::from_section( + "Press 't' to toggle drawing gizmos on top of everything else in the scene", + TextStyle { + font_size: 20., + ..default() + }, + ) + .with_style(Style { + position_type: PositionType::Absolute, + top: Val::Px(12.0), + left: Val::Px(12.0), ..default() - }, - )); + }), + ); } fn system(mut gizmos: Gizmos, time: Res