bevy/crates/bevy_ui/src
Joshua Chapman 9dd8fbc570 Added Ref to allow immutable access with change detection (#7097)
# Objective

- Fixes #7066 

## Solution

- Split the ChangeDetection trait into ChangeDetection and ChangeDetectionMut
- Added Ref as equivalent to &T with change detection

---

## Changelog

- Support for Ref which allow inspecting change detection flags in an immutable way

## Migration Guide

- While bevy prelude includes both ChangeDetection and ChangeDetectionMut any code explicitly referencing ChangeDetection might need to be updated to ChangeDetectionMut or both. Specifically any reading logic requires ChangeDetection while writes requires ChangeDetectionMut.

use bevy_ecs::change_detection::DetectChanges -> use bevy_ecs::change_detection::{DetectChanges, DetectChangesMut}

- Previously Res had methods to access change detection `is_changed` and `is_added` those methods have been moved to the `DetectChanges` trait. If you are including bevy prelude you will have access to these types otherwise you will need to `use bevy_ecs::change_detection::DetectChanges` to continue using them.
2023-01-11 15:41:54 +00:00
..
flex Added Ref to allow immutable access with change detection (#7097) 2023-01-11 15:41:54 +00:00
render Fix overflow scaling for images (#7142) 2023-01-09 21:43:30 +00:00
widget text aspect ratio bug fix (#6825) 2022-12-20 16:44:12 +00:00
camera_config.rs Fix UiCameraConfig doc (link to the Camera page) (#6969) 2022-12-20 23:32:04 +00:00
focus.rs Added Ref to allow immutable access with change detection (#7097) 2023-01-11 15:41:54 +00:00
geometry.rs Add const to methods and const defaults to bevy_ui (#5542) 2023-01-04 19:58:09 +00:00
lib.rs Remove ImageMode (#6674) 2022-11-18 21:16:32 +00:00
node_bundles.rs Remove needless manual default impl of ButtonBundle (#6970) 2022-12-20 16:17:14 +00:00
stack.rs Add z-index support with a predictable UI stack (#5877) 2022-11-02 22:06:04 +00:00
ui_node.rs Fix various typos (#7096) 2023-01-06 00:43:30 +00:00
update.rs Add z-index support with a predictable UI stack (#5877) 2022-11-02 22:06:04 +00:00