bevy/crates/bevy_ui/src
BD103 069a8776f5
Feature-gate all references to bevy_text in bevy_ui (#11391)
# Objective

- `bevy_ui` fails to compile without `bevy_text` being enabled.
- Fixes #11363.

## Solution

- Add `#[cfg(feature = "bevy_text")]` to all items that require it.

I think this change is honestly a bit ugly, but I can't see any other
way around it. I considered making `bevy_text` required, but we agreed
[on
Discord](https://discord.com/channels/691052431525675048/743663673393938453/1196868117486379148)
that there were some use cases for `bevy_ui` without `bevy_text`. If you
have any ideas that decreases the amount of `#[cfg(...)]`s and
`#[allow(...)]`s, that would be greatly appreciated.

This was tested by running the following commands:

```shell
$ cargo clippy -p bevy_ui
$ cargo clippy -p bevy_ui -F bevy_text
$ cargo run -p ci
```

---

## Changelog

- Fixed `bevy_ui` not compiling without `bevy_text`.
2024-01-28 16:24:54 +00:00
..
layout Fix panic on Text UI without Cameras (#11405) 2024-01-18 20:33:22 +00:00
render Feature-gate all references to bevy_text in bevy_ui (#11391) 2024-01-28 16:24:54 +00:00
widget Feature-gate all references to bevy_text in bevy_ui (#11391) 2024-01-28 16:24:54 +00:00
accessibility.rs resolve all internal ambiguities (#10411) 2024-01-09 19:08:15 +00:00
focus.rs Rustdoc links in bevy_ui (#11555) 2024-01-28 02:21:39 +00:00
geometry.rs Made the remaining types from bevy_ui to reflect the Default trait if… (#11199) 2024-01-03 18:57:05 +00:00
lib.rs Feature-gate all references to bevy_text in bevy_ui (#11391) 2024-01-28 16:24:54 +00:00
measurement.rs Change the default for the measure_func field of ContentSize to None. (#9346) 2023-08-07 23:06:40 +00:00
node_bundles.rs Rustdoc links in bevy_ui (#11555) 2024-01-28 02:21:39 +00:00
stack.rs Remove unnecessary parentheses (#10990) 2023-12-16 02:26:18 +00:00
ui_material.rs Provide GlobalsUniform in UiMaterial shaders (#10739) 2023-11-28 12:08:28 +00:00
ui_node.rs Rustdoc links in bevy_ui (#11555) 2024-01-28 02:21:39 +00:00
update.rs Camera-driven UI (#10559) 2024-01-16 00:39:10 +00:00