bevy/crates/bevy_ui/src/render
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
..
mod.rs Feature-gate all references to bevy_text in bevy_ui (#11391) 2024-01-28 16:24:54 +00:00
pipeline.rs Bind group layout entries (#10224) 2023-11-28 04:00:49 +00:00
render_pass.rs Revert rendering-related associated type name changes (#11027) 2024-01-22 15:01:55 +00:00
ui_material_pipeline.rs Revert rendering-related associated type name changes (#11027) 2024-01-22 15:01:55 +00:00
ui_material.wgsl Provide GlobalsUniform in UiMaterial shaders (#10739) 2023-11-28 12:08:28 +00:00
ui_vertex_output.wgsl Add UI Materials (#9506) 2023-11-03 22:33:01 +00:00
ui.wgsl update shader imports (#10180) 2023-10-21 11:51:58 +00:00