bevy/examples/mobile
ickshonpe 166686e0f2
Rename TextAlignment to JustifyText. (#10854)
# Objective

The name `TextAlignment` is really deceptive and almost every new user
gets confused about the differences between aligning text with
`TextAlignment`, aligning text with `Style` and aligning text with
anchor (when using `Text2d`).

## Solution

* Rename `TextAlignment` to `JustifyText`. The associated helper methods
are also renamed.
* Improve the doc comments for text explaining explicitly how the
`JustifyText` component affects the arrangement of text.
* Add some extra cases to the `text_debug` example that demonstate the
differences between alignment using `JustifyText` and alignment using
`Style`.
<img width="757" alt="text_debug_2"
src="https://github.com/bevyengine/bevy/assets/27962798/9d53e647-93f9-4bc7-8a20-0d9f783304d2">

---

## Changelog
* `TextAlignment` has been renamed to `JustifyText`
* `TextBundle::with_text_alignment` has been renamed to
`TextBundle::with_text_justify`
* `Text::with_alignment` has been renamed to `Text::with_justify`
* The `text_alignment` field of `TextMeasureInfo` has been renamed to
`justification`

## Migration Guide
* `TextAlignment` has been renamed to `JustifyText`
* `TextBundle::with_text_alignment` has been renamed to
`TextBundle::with_text_justify`
* `Text::with_alignment` has been renamed to `Text::with_justify`
* The `text_alignment` field of `TextMeasureInfo` has been renamed to
`justification`
2023-12-05 03:00:41 +00:00
..
.cargo Fix alignment on ios simulator (#10178) 2023-10-21 22:19:46 +00:00
bevy_mobile_example.xcodeproj daily job running mobile example on real devices (#8216) 2023-03-28 23:16:07 +00:00
ios-src IOS, Android... same thing (#7493) 2023-02-06 18:08:49 +00:00
src Rename TextAlignment to JustifyText. (#10854) 2023-12-05 03:00:41 +00:00
.gitignore IOS, Android... same thing (#7493) 2023-02-06 18:08:49 +00:00
build_rust_deps.sh Fix alignment on ios simulator (#10178) 2023-10-21 22:19:46 +00:00
Cargo.toml Add [lints] table, fix adding #![allow(clippy::type_complexity)] everywhere (#10011) 2023-11-18 20:58:48 +00:00
Makefile Improve selection of iOS device in mobile example (#9282) 2023-10-08 20:57:41 +00:00